Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@
},
"name": "angular-sanitize.js (to securely parse and manipulate HTML)",
"checked": true
},
{
"value": {
"key": "messages",
"module": "ngMessages"
},
"name": "angular-messages.js (enhanced support for displaying messages within templates)",
"checked": true
},
{
"value": {
"key": "aria",
"module": "ngAria"
},
"name": "angular-aria.js (support for common ARIA attributes)",
"checked": true
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions app/templates/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"angular-touch": "<%- props.angularVersion %>",
<% } if (angularModulesObject.sanitize) { -%>
"angular-sanitize": "<%- props.angularVersion %>",
<% } if (angularModulesObject.messages) { -%>
"angular-messages": "<%- props.angularVersion %>",
<% } if (angularModulesObject.aria) { -%>
"angular-aria": "<%- props.angularVersion %>",
<% } if (props.jQuery.key === 'jquery1') { -%>
"jquery": "~1.11.3",
<% } if (props.jQuery.key === 'jquery2') { -%>
Expand Down
8 changes: 7 additions & 1 deletion test/template/test-bower.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ chai.use(sinonChai);

var templateTools = require('../template-tools');
var mockModel = require('./mock-model');
var angularModulesObject = { animate: true, cookies: true, touch: true, sanitize: true };
var angularModulesObject = { animate: true, cookies: true, touch: true, sanitize: true, messages: true, aria: true };

describe('gulp-angular bower template', function () {
var bower, model;
Expand All @@ -33,6 +33,8 @@ describe('gulp-angular bower template', function () {
result.should.match(/"angular-cookies": "angular-test-version"/);
result.should.match(/"angular-touch": "angular-test-version"/);
result.should.match(/"angular-sanitize": "angular-test-version"/);
result.should.match(/"angular-messages": "angular-test-version"/);
result.should.match(/"angular-aria": "angular-test-version"/);
result.should.match(/"angular-resource": "angular-test-version"/);
result.should.match(/"angular": "angular-test-version"/);
});
Expand All @@ -50,6 +52,8 @@ describe('gulp-angular bower template', function () {
result.should.match(/angular-cookies/);
result.should.match(/angular-touch/);
result.should.match(/angular-sanitize/);
result.should.match(/angular-messages/);
result.should.match(/angular-aria/);
});

it('should not add angular modules in bower when not selected', function() {
Expand All @@ -59,6 +63,8 @@ describe('gulp-angular bower template', function () {
result.should.not.match(/angular-cookies/);
result.should.not.match(/angular-touch/);
result.should.not.match(/angular-sanitize/);
result.should.not.match(/angular-messages/);
result.should.not.match(/angular-aria/);
});

it('should add the right jquery', function() {
Expand Down