Skip to content

Commit d8045f0

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

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
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

scripts/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async function validateAllFiles() {
8181

8282
// Get all JSON files except index.json
8383
const files = fs.readdirSync(dataDir)
84-
.filter(file => file.endsWith('.json') && file !== 'index.json')
84+
.filter(file => file.endsWith('.json') && file !== 'index.json' && file !== '_template.json')
8585
.map(file => path.join(dataDir, file));
8686

8787
console.log(`\x1b[36mValidating ${files.length} JSON files in data directory...\x1b[0m\n`);

0 commit comments

Comments
 (0)