generator-sails-rest-api
Version:
Yeoman generator that provides already configured and optimized Sails REST API with bundle of predefined features
20 lines (15 loc) • 360 B
JavaScript
;
/**
* Step 7
* Where installation are run (npm, bower)
*/
const DEPENDENCIES = {
count: ['lodash', 'pluralize'],
pluralize: ['lodash']
};
module.exports = function () {
const name = this.options['hook-name'].replace(/Hook/, '').toLowerCase();
if (DEPENDENCIES[name]) {
this.npmInstall(DEPENDENCIES[name], {save: true});
}
};