| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a2062dd commit 6d2186d
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,8 +16,11 @@ const mkdirsAsync = require('./utils').mkdirsAsync; | |||
| 16 | 16 | */ | |
| 17 | 17 | const scaffold = (projectDir, sourceDir, publicDir, exportDir) => | |
| 18 | 18 | wrapAsync(function*() { | |
| 19 | - if (!fs.existsSync(path.resolve(projectDir, 'package.json'))) { | ||
| 20 | - execa.sync('npm', ['init', '-y']); | ||
| 19 | + const projectPath = path.join(process.cwd(), projectDir); | ||
| 20 | + if (!fs.existsSync(path.join(projectPath, 'package.json'))) { | ||
| 21 | + execa.sync('npm', ['init', '-y'], { | ||
| 22 | + cwd: projectPath, | ||
| 23 | + }); | ||
| 21 | 24 | } | |
| 22 | 25 | /** | |
| 23 | 26 | * Create mandatory files structure | |
| Back | FazBrowse Home | New Git URL |
0 commit comments