From 9f619c8898204478bdd04718cc73e94ac962178c Mon Sep 17 00:00:00 2001 From: Benjamin Toby Date: Sun, 22 Mar 2026 05:06:36 +0100 Subject: [PATCH] Update init. Remove uneccessary directores creation --- dist/functions/init.js | 2 ++ package.json | 2 +- src/functions/init.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/functions/init.js b/dist/functions/init.js index d2ecaf8..7a93c38 100644 --- a/dist/functions/init.js +++ b/dist/functions/init.js @@ -18,6 +18,8 @@ export default async function () { for (let i = 0; i < keys.length; i++) { const key = keys[i]; const dir = dirNames[key]; + if (!dir.match(/\//)) + continue; if (!existsSync(dir) && !dir.match(/\.\w+$/)) { mkdirSync(dir, { recursive: true }); continue; diff --git a/package.json b/package.json index 175e2f9..46253bc 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ ], "scripts": { "dev": "tsc --watch", - "git:push": "tsc --noEmit && tsc && git add . && git commit -m 'Update HMR logic. Refresh on server props update.' && git push", + "git:push": "tsc --noEmit && tsc && git add . && git commit -m 'Update init. Remove uneccessary directores creation' && git push", "compile": "bun build ./src/commands/index.ts --compile --outfile bin/bunext --minify", "build": "tsc", "test": "bun test --max-concurrency=1" diff --git a/src/functions/init.ts b/src/functions/init.ts index cb2d03b..452e474 100644 --- a/src/functions/init.ts +++ b/src/functions/init.ts @@ -30,6 +30,8 @@ export default async function () { const key = keys[i]; const dir = dirNames[key]; + if (!dir.match(/\//)) continue; + if (!existsSync(dir) && !dir.match(/\.\w+$/)) { mkdirSync(dir, { recursive: true }); continue;