create-gamenative-app 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create.js +6 -9
- package/package.json +1 -1
package/bin/create.js
CHANGED
|
@@ -3,7 +3,7 @@ import inquirer from 'inquirer'
|
|
|
3
3
|
import { mkdir, writeFile, copyFile, readFile } from 'fs/promises'
|
|
4
4
|
import { join, dirname } from 'path'
|
|
5
5
|
import { fileURLToPath } from 'url'
|
|
6
|
-
import {
|
|
6
|
+
import { execSync } from 'child_process'
|
|
7
7
|
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
9
9
|
const FRAMEWORK_ROOT = join(__dirname, '..')
|
|
@@ -343,14 +343,11 @@ All of this is done in your \`Game.ts\` using \`ctx.gl\`, \`ctx.input\`, and the
|
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
function npmInstall(cwd) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
})
|
|
352
|
-
child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('npm install failed'))))
|
|
353
|
-
})
|
|
346
|
+
try {
|
|
347
|
+
execSync('npm install', { cwd, stdio: 'inherit' })
|
|
348
|
+
} catch {
|
|
349
|
+
throw new Error('npm install failed')
|
|
350
|
+
}
|
|
354
351
|
}
|
|
355
352
|
|
|
356
353
|
async function main() {
|