You can generate a package.json
as part of your scaffolding just as any other file. It can even contain template markup, as in generator-webapp.
If you scaffold out a package.json
in the root directory of your generated project, you can run installDependencies()
of the generator object at the end:
this.on('end', function () {
this.installDependencies();
});
This will take care of installing bower and npm dependencies that the project declares.