From f81ee435ec73a833a61ba3f9a96fcbd5ced56ec6 Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Sat, 10 Nov 2018 18:26:04 +0800 Subject: [PATCH] fix: accept all options in generator.npmInstall --- lib/GeneratorContext.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/GeneratorContext.js b/lib/GeneratorContext.js index 7d42feb..b1f7465 100644 --- a/lib/GeneratorContext.js +++ b/lib/GeneratorContext.js @@ -56,10 +56,15 @@ module.exports = class GeneratorContext { } } - npmInstall() { - return require('./installPackages')({ - cwd: this.outDir - }) + npmInstall(opts) { + return require('./installPackages')( + Object.assign( + { + cwd: this.outDir + }, + opts + ) + ) } showProjectTips() {