We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
__dirname
1 parent 313b395 commit 7e1072aCopy full SHA for 7e1072a
packages/create-ts-api/src/index.js
@@ -6,7 +6,11 @@ import fs from 'fs-extra';
6
import path from 'path';
7
import inquirer from 'inquirer';
8
import simpleGit from 'simple-git';
9
+import { fileURLToPath } from 'url';
10
11
+const filename = fileURLToPath(import.meta.url);
12
+const dirname = path.dirname(filename);
13
+console.log(dirname);
14
inquirer
15
.prompt([
16
{
@@ -119,7 +123,7 @@ async function createApp(
119
123
120
124
fs.mkdirsSync(projectDestination);
121
125
122
- fs.copySync(path.join(__dirname, '..', template), projectName);
126
+ fs.copySync(path.join(dirname, '..', template), projectName);
127
128
const packageJson = JSON.parse(
129
fs.readFileSync(path.join(projectName, 'package.json'))
0 commit comments