We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aef661a + 5993ebb commit bb038a0Copy full SHA for bb038a0
packages/cli/bin/scaffold.js
@@ -16,8 +16,11 @@ const mkdirsAsync = require('./utils').mkdirsAsync;
16
*/
17
const scaffold = (projectDir, sourceDir, publicDir, exportDir) =>
18
wrapAsync(function*() {
19
- if (!fs.existsSync(path.resolve(projectDir, 'package.json'))) {
20
- execa.sync('npm', ['init', '-y']);
+ const projectPath = path.join(process.cwd(), projectDir);
+ if (!fs.existsSync(path.join(projectPath, 'package.json'))) {
21
+ execa.sync('npm', ['init', '-y'], {
22
+ cwd: projectPath,
23
+ });
24
}
25
/**
26
* Create mandatory files structure
0 commit comments