Skip to content

Commit

Permalink
feat(app): add ngAria and ngMessages
Browse files Browse the repository at this point in the history
Adds support for ngAria and ngMessages

Fixes yeoman#917
  • Loading branch information
eddiemonge committed Nov 7, 2014
1 parent 014da95 commit dfbfd1f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
26 changes: 26 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,18 @@ var Generator = module.exports = function Generator(args, options) {
enabledComponents.push('angular-animate/angular-animate.js');
}

if (this.ariaModule) {
enabledComponents.push('angular-aria/angular-aria.js');
}

if (this.cookiesModule) {
enabledComponents.push('angular-cookies/angular-cookies.js');
}

if (this.messagesModule) {
enabledComponents.push('angular-messages/angular-messages.js');
}

if (this.resourceModule) {
enabledComponents.push('angular-resource/angular-resource.js');
}
Expand Down Expand Up @@ -210,6 +218,10 @@ Generator.prototype.askForModules = function askForModules() {
value: 'animateModule',
name: 'angular-animate.js',
checked: true
}, {
value: 'ariaModule',
name: 'angular-aria.js',
checked: false
}, {
value: 'cookiesModule',
name: 'angular-cookies.js',
Expand All @@ -218,6 +230,10 @@ Generator.prototype.askForModules = function askForModules() {
value: 'resourceModule',
name: 'angular-resource.js',
checked: true
}, {
value: 'messagesModule',
name: 'angular-messages.js',
checked: false
}, {
value: 'routeModule',
name: 'angular-route.js',
Expand All @@ -237,7 +253,9 @@ Generator.prototype.askForModules = function askForModules() {
this.prompt(prompts, function (props) {
var hasMod = function (mod) { return props.modules.indexOf(mod) !== -1; };
this.animateModule = hasMod('animateModule');
this.ariaModule = hasMod('ariaModule');
this.cookiesModule = hasMod('cookiesModule');
this.messagesModule = hasMod('messagesModule');
this.resourceModule = hasMod('resourceModule');
this.routeModule = hasMod('routeModule');
this.sanitizeModule = hasMod('sanitizeModule');
Expand All @@ -249,10 +267,18 @@ Generator.prototype.askForModules = function askForModules() {
angMods.push("'ngAnimate'");
}

if (this.ariaModule) {
angMods.push("'ngAria'");
}

if (this.cookiesModule) {
angMods.push("'ngCookies'");
}

if (this.messagesModule) {
angMods.push("'ngMessages'");
}

if (this.resourceModule) {
angMods.push("'ngResource'");
}
Expand Down
6 changes: 4 additions & 2 deletions templates/common/root/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"es5-shim": "^4.0.0"<% if (bootstrap) { %>,<% if (!compassBootstrap) { %>
"bootstrap": "^3.2.0"<% } else { %>
"bootstrap-sass-official": "^3.2.0"<% } } %><% if (animateModule) { %>,
"angular-animate": "^<%= ngVer %>"<% } %><% if (cookiesModule) { %>,
"angular-cookies": "^<%= ngVer %>"<% } %><% if (resourceModule) { %>,
"angular-animate": "^<%= ngVer %>"<% } %><% if (ariaModule) { %>,
"angular-aria": "^<%= ngVer %>"<% } %><% if (cookiesModule) { %>,
"angular-cookies": "^<%= ngVer %>"<% } %><% if (messagesModule) { %>,
"angular-messages": "^<%= ngVer %>"<% } %><% if (resourceModule) { %>,
"angular-resource": "^<%= ngVer %>"<% } %><% if (routeModule) { %>,
"angular-route": "^<%= ngVer %>"<% } %><% if (sanitizeModule) { %>,
"angular-sanitize": "^<%= ngVer %>"<% } %><% if (touchModule) { %>,
Expand Down

0 comments on commit dfbfd1f

Please sign in to comment.