Skip to content

Commit ddfc265

Browse files
committed
fix: template path
1 parent afefc04 commit ddfc265

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/create-commandkit/src/functions/copyTemplates.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
import fs from 'fs-extra';
22
import path from 'node:path';
3-
import url from 'node:url';
4-
53
import type { Language } from '../types';
64

7-
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
8-
95
const templates = {
10-
js: path.join(__dirname, '..', 'templates', 'JavaScript'),
11-
ts: path.join(__dirname, '..', 'templates', 'TypeScript'),
6+
js: path.join(import.meta.dirname, '..', '..', 'templates', 'JavaScript'),
7+
ts: path.join(import.meta.dirname, '..', '..', 'templates', 'TypeScript'),
128
};
139

1410
const gitignore = `

0 commit comments

Comments
 (0)