generator-at-angular
Version:
Yeoman angular application generator thet uses Webpack, SASS, UI router, Karma and Jasmine for testing, and auto generated docs.
54 lines (41 loc) • 1.29 kB
JavaScript
const _ = require("lodash");
module.exports = function (AngularATGenerator) {
// Install optional dependencies
AngularATGenerator.prototype.installDependencies = function installDependencies() {
let deps = [
"angular",
"angular-ui-router"
];
if (this.props.bootstrapSass) {
deps.push("bootstrap-sass");
}
if (this.props.lodash) {
deps.push("lodash");
}
if (this.props.moment) {
deps.push("moment");
}
if (this.props.normalize) {
deps.push("normalize-css");
}
if (this.props.styles.material) {
deps.push("material-icons");
}
// extraDeps are added by flags only not by user input
if(this.props.extraDeps){
this.props.extraDeps.forEach(function(dep){
deps.push(dep.dependency);
});
}
deps = _.concat(deps, this.importList);
this.npmInstall(deps, {'save': true});
};
// Install dependencies from package.json
AngularATGenerator.prototype.install = function install() {
// install templated dependencies
if(!this.options.skipinstall){
this.npmInstall();
}
};
};
;