From ddfc2653d89fbda0ba88f052bedbced56eab5bd6 Mon Sep 17 00:00:00 2001 From: twlite <46562212+twlite@users.noreply.github.com> Date: Sun, 22 Jun 2025 11:46:23 +0545 Subject: [PATCH] fix: template path --- packages/create-commandkit/src/functions/copyTemplates.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/create-commandkit/src/functions/copyTemplates.ts b/packages/create-commandkit/src/functions/copyTemplates.ts index a49c5bce..5653b85e 100644 --- a/packages/create-commandkit/src/functions/copyTemplates.ts +++ b/packages/create-commandkit/src/functions/copyTemplates.ts @@ -1,14 +1,10 @@ import fs from 'fs-extra'; import path from 'node:path'; -import url from 'node:url'; - import type { Language } from '../types'; -const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); - const templates = { - js: path.join(__dirname, '..', 'templates', 'JavaScript'), - ts: path.join(__dirname, '..', 'templates', 'TypeScript'), + js: path.join(import.meta.dirname, '..', '..', 'templates', 'JavaScript'), + ts: path.join(import.meta.dirname, '..', '..', 'templates', 'TypeScript'), }; const gitignore = `