diff --git a/package-lock.json b/package-lock.json index 2c6bd2b9..6fa88783 100644 --- a/package-lock.json +++ b/package-lock.json @@ -137,9 +137,9 @@ } }, "@types/inquirer": { - "version": "0.0.38", - "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-0.0.38.tgz", - "integrity": "sha512-RyZaZKuHFAQTZcrVaW7QgdMYYqEk2FS3eNLfU1rszURBehIiOtiv3AXVkelAVNmZb9dD6pruXaom/5V57pMcEQ==", + "version": "0.0.40", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-0.0.40.tgz", + "integrity": "sha512-MEUWlhRf/BxZIXHD4p3AR/HnmZYHBLoIDqwZcNB8wNWsIFyEOZPh23b0LFAnKDPYOdgD6Kz9Ju4K661AC/zBng==", "dev": true, "requires": { "@types/rx": "4.1.1", diff --git a/src/init.ts b/src/init.ts index af8d147d..632e1d5a 100644 --- a/src/init.ts +++ b/src/init.ts @@ -215,7 +215,9 @@ export async function init(options: Options): Promise { // Run `npm install` after initial setup so `npm run check` works right away. if (!options.dryRun) { - cp.spawnSync('npm', ['install'], {stdio: 'inherit'}); + // --ignore-scripts so that compilation doesn't happen because there's no + // source files yet. + cp.spawnSync('npm', ['install', '--ignore-scripts'], {stdio: 'inherit'}); } return true; diff --git a/test/test-kitchen.ts b/test/test-kitchen.ts index 00614f2c..b6105d5d 100644 --- a/test/test-kitchen.ts +++ b/test/test-kitchen.ts @@ -86,6 +86,11 @@ test.serial('init', async t => { execOpts); } fs.accessSync(`${stagingPath}/kitchen/tsconfig.json`); + + // Compilation shouldn't have happened. Hence no `build` directory. + const dirContents = fs.readdirSync(`${stagingPath}/kitchen`); + t.is(dirContents.indexOf('build'), -1); + t.pass(); });