Skip to content

Commit e82578f

Browse files
committed
feat: add template file
1 parent 3869bbe commit e82578f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

data/_template.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "",
3+
"description": "",
4+
"link": "",
5+
"tags": [
6+
"command-line"
7+
]
8+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
7+
"dev": "node scripts/merge.js && vite",
88
"build": "node scripts/merge.js && tsc -b && vite build",
99
"lint": "eslint .",
1010
"preview": "vite preview",

scripts/merge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (indexExists) {
2727
// Otherwise read all .json files in the directory (except index.json)
2828
console.log('Index file not found, reading all JSON files in the directory...');
2929
toolFiles = fs.readdirSync(dataDir)
30-
.filter(file => file.endsWith('.json') && file !== 'index.json');
30+
.filter(file => file.endsWith('.json') && file !== 'index.json' && file !== '_template.json');
3131
console.log(`Found ${toolFiles.length} JSON files in directory`);
3232
}
3333

0 commit comments

Comments
 (0)