Skip to content

Commit 77082c6

Browse files
committed
feat(app): update to angular 1.2.0
Update Angular and its deps to 1.2.0. Also updates other deps. Breaking changes: The gruntfile has changed slightly. Specifically ngmin has been moved in the build order and its config targets have been updated from dist to tmp
1 parent 3da4a13 commit 77082c6

File tree

4 files changed

+44
-27
lines changed

4 files changed

+44
-27
lines changed

Diff for: app/index.js

+16
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ var Generator = module.exports = function Generator(args, options) {
8282
enabledComponents.push('angular-sanitize/angular-sanitize.js');
8383
}
8484

85+
if (this.routeModule) {
86+
enabledComponents.push('angular-route/angular-route.js');
87+
}
88+
8589
this.invoke('karma:app', {
8690
options: {
8791
coffee: this.options.coffee,
@@ -143,6 +147,10 @@ Generator.prototype.askForModules = function askForModules() {
143147
value: 'sanitizeModule',
144148
name: 'angular-sanitize.js',
145149
checked: true
150+
}, {
151+
value: 'routeModule',
152+
name: 'angular-route.js',
153+
checked: true
146154
}]
147155
}];
148156

@@ -151,6 +159,7 @@ Generator.prototype.askForModules = function askForModules() {
151159
this.resourceModule = hasMod('resourceModule');
152160
this.cookiesModule = hasMod('cookiesModule');
153161
this.sanitizeModule = hasMod('sanitizeModule');
162+
this.routeModule = hasMod('routeModule');
154163

155164
var angMods = [];
156165

@@ -164,6 +173,9 @@ Generator.prototype.askForModules = function askForModules() {
164173
if (this.sanitizeModule) {
165174
angMods.push("'ngSanitize'");
166175
}
176+
if (this.routeModule) {
177+
angMods.push("'ngRoute'");
178+
}
167179

168180
if (angMods.length) {
169181
this.env.options.angularDeps = "\n " + angMods.join(",\n ") +"\n";
@@ -244,6 +256,10 @@ Generator.prototype.extraModules = function extraModules() {
244256
modules.push('bower_components/angular-sanitize/angular-sanitize.js');
245257
}
246258

259+
if (this.routeModule) {
260+
modules.push('bower_components/angular-route/angular-route.js');
261+
}
262+
247263
if (modules.length) {
248264
this.indexFile = this.appendScripts(this.indexFile, 'scripts/modules.js',
249265
modules);

Diff for: templates/common/Gruntfile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ module.exports = function (grunt) {
184184
html: ['<%%= yeoman.dist %>/{,*/}*.html'],
185185
css: ['<%%= yeoman.dist %>/styles/{,*/}*.css'],
186186
options: {
187-
dirs: ['<%%= yeoman.dist %>']
187+
assetsDirs: ['<%%= yeoman.dist %>']
188188
}
189189
},
190190
imagemin: {
@@ -307,9 +307,9 @@ module.exports = function (grunt) {
307307
dist: {
308308
files: [{
309309
expand: true,
310-
cwd: '<%%= yeoman.dist %>/scripts',
310+
cwd: '.tmp/concat/scripts',
311311
src: '*.js',
312-
dest: '<%%= yeoman.dist %>/scripts'
312+
dest: '.tmp/concat/scripts'
313313
}]
314314
}
315315
},
@@ -352,9 +352,9 @@ module.exports = function (grunt) {
352352
'concurrent:dist',
353353
'autoprefixer',
354354
'concat',
355+
'ngmin',
355356
'copy:dist',
356357
'cdnify',
357-
'ngmin',
358358
'cssmin',
359359
'uglify',
360360
'rev',

Diff for: templates/common/_bower.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
"name": "<%= _.slugify(_.humanize(appname)) %>",
33
"version": "0.0.0",
44
"dependencies": {
5-
"angular": "~1.0.8",
5+
"angular": "~1.2.0",
66
"json3": "~3.2.4",<% if (bootstrap) { %>
77
"jquery": "~1.10.0",
88
"sass-bootstrap": "~3.0.0",
9-
<% } %>"es5-shim": "~2.0.8"<% if (resourceModule) { %>,
10-
"angular-resource": "~1.0.7"<% } %><% if (cookiesModule) { %>,
11-
"angular-cookies": "~1.0.7"<% } %><% if (sanitizeModule) { %>,
12-
"angular-sanitize": "~1.0.7"<% } %>
9+
<% } %>"es5-shim": "~2.1.0"<% if (resourceModule) { %>,
10+
"angular-resource": "~1.2.0"<% } %><% if (cookiesModule) { %>,
11+
"angular-cookies": "~1.2.0"<% } %><% if (sanitizeModule) { %>,
12+
"angular-sanitize": "~1.2.0"<% } %><% if (routeModule) { %>,
13+
"angular-route": "~1.2.0"<% } %>
1314
},
1415
"devDependencies": {
15-
"angular-mocks": "~1.0.7",
16-
"angular-scenario": "~1.0.7"
16+
"angular-mocks": "~1.2.0",
17+
"angular-scenario": "~1.2.0"
1718
}
1819
}

Diff for: templates/common/_package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44
"dependencies": {},
55
"devDependencies": {
66
"grunt": "~0.4.1",
7-
"grunt-contrib-copy": "~0.4.1",
8-
"grunt-contrib-concat": "~0.3.0",
7+
"grunt-autoprefixer": "~0.4.0",
8+
"grunt-concurrent": "~0.4.1",
9+
"grunt-contrib-clean": "~0.5.0",
910
"grunt-contrib-coffee": "~0.7.0",
10-
"grunt-contrib-uglify": "~0.2.0",
11-
"grunt-contrib-compass": "~0.5.0",
12-
"grunt-contrib-jshint": "~0.6.0",
13-
"grunt-contrib-cssmin": "~0.6.0",
11+
"grunt-contrib-compass": "~0.6.0",
12+
"grunt-contrib-concat": "~0.3.0",
1413
"grunt-contrib-connect": "~0.5.0",
15-
"grunt-contrib-clean": "~0.5.0",
14+
"grunt-contrib-copy": "~0.4.1",
15+
"grunt-contrib-cssmin": "~0.7.0",
1616
"grunt-contrib-htmlmin": "~0.1.3",
17-
"grunt-contrib-imagemin": "~0.2.0",
17+
"grunt-contrib-imagemin": "~0.3.0",
18+
"grunt-contrib-jshint": "~0.7.1",
19+
"grunt-contrib-uglify": "~0.2.0",
1820
"grunt-contrib-watch": "~0.5.2",
19-
"grunt-autoprefixer": "~0.2.0",
20-
"grunt-usemin": "~0.1.11",
21-
"grunt-svgmin": "~0.2.0",
22-
"grunt-rev": "~0.1.0",
23-
"grunt-concurrent": "~0.3.0",
24-
"load-grunt-tasks": "~0.1.0",
2521
"grunt-google-cdn": "~0.2.0",
2622
"grunt-ngmin": "~0.0.2",
27-
"time-grunt": "~0.1.0",
28-
"jshint-stylish": "~0.1.3"
23+
"grunt-rev": "~0.1.0",
24+
"grunt-svgmin": "~0.2.0",
25+
"grunt-usemin": "~2.0.0",
26+
"jshint-stylish": "~0.1.3",
27+
"load-grunt-tasks": "~0.2.0",
28+
"time-grunt": "~0.2.0"
2929
},
3030
"engines": {
3131
"node": ">=0.8.0"

0 commit comments

Comments
 (0)