After generating my project scaffolding, I'd like Yeoman to install my npm dependencies in a subfolder, rather than in the main project folder. I have my package.json file in the /gulp subfolder of my project. How can I have Yeoman install the dependencies there? Here is my current function that runs at the end of the generator:
this.on('end', function () {
if (!this.options['skip-install']) {
this.installDependencies({
bower: false,
npm: true
});
}
});
this.spawnCommand("npm", ["install"], { cwd: 'scripts'})
where cwd points to the directory you wish to run your command from. – Effuse