From 17c95deaef9f2f8f133d9d61a4058273f16e89bc Mon Sep 17 00:00:00 2001 From: Matthieu Lux Date: Tue, 1 Sep 2015 18:33:08 +0200 Subject: [PATCH 1/2] add ngMessages and ngAria in the standard modules choices --- app/prompts.json | 16 ++++++++++++++++ app/templates/_bower.json | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/app/prompts.json b/app/prompts.json index 3a49d8c3..aec30758 100644 --- a/app/prompts.json +++ b/app/prompts.json @@ -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 } ] }, diff --git a/app/templates/_bower.json b/app/templates/_bower.json index 944d5296..6b84fd23 100644 --- a/app/templates/_bower.json +++ b/app/templates/_bower.json @@ -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') { -%> From 1dc8aed6e624a7da9041be45a602571c3b8c0a06 Mon Sep 17 00:00:00 2001 From: Matthieu Lux Date: Tue, 1 Sep 2015 21:03:19 +0200 Subject: [PATCH 2/2] complete test coverage --- test/template/test-bower.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/template/test-bower.js b/test/template/test-bower.js index a9c79ae0..469cb0fa 100644 --- a/test/template/test-bower.js +++ b/test/template/test-bower.js @@ -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; @@ -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"/); }); @@ -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() { @@ -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() {