生成我的项目脚手架后,我希望 Yeoman 将我的 npm 依赖项安装在子文件夹中,而不是主项目文件夹中。我的 package.json 文件位于项目的 /gulp 子文件夹中。如何让 Yeoman 在那里安装依赖项?这是我当前在生成器末尾运行的函数:
this.on('end', function () {
if (!this.options['skip-install']) {
this.installDependencies({
bower: false,
npm: true
});
}
});