Skip to content

Commit

Permalink
feat(app): update to angular 1.2.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eddiemonge committed Nov 8, 2013
1 parent 3da4a13 commit 77082c6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 27 deletions.
16 changes: 16 additions & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ var Generator = module.exports = function Generator(args, options) {
enabledComponents.push('angular-sanitize/angular-sanitize.js');
}

if (this.routeModule) {
enabledComponents.push('angular-route/angular-route.js');
}

this.invoke('karma:app', {
options: {
coffee: this.options.coffee,
Expand Down Expand Up @@ -143,6 +147,10 @@ Generator.prototype.askForModules = function askForModules() {
value: 'sanitizeModule',
name: 'angular-sanitize.js',
checked: true
}, {
value: 'routeModule',
name: 'angular-route.js',
checked: true
}]
}];

Expand All @@ -151,6 +159,7 @@ Generator.prototype.askForModules = function askForModules() {
this.resourceModule = hasMod('resourceModule');
this.cookiesModule = hasMod('cookiesModule');
this.sanitizeModule = hasMod('sanitizeModule');
this.routeModule = hasMod('routeModule');

var angMods = [];

Expand All @@ -164,6 +173,9 @@ Generator.prototype.askForModules = function askForModules() {
if (this.sanitizeModule) {
angMods.push("'ngSanitize'");
}
if (this.routeModule) {
angMods.push("'ngRoute'");
}

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

if (this.routeModule) {
modules.push('bower_components/angular-route/angular-route.js');
}

if (modules.length) {
this.indexFile = this.appendScripts(this.indexFile, 'scripts/modules.js',
modules);
Expand Down
8 changes: 4 additions & 4 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ module.exports = function (grunt) {
html: ['<%%= yeoman.dist %>/{,*/}*.html'],
css: ['<%%= yeoman.dist %>/styles/{,*/}*.css'],
options: {
dirs: ['<%%= yeoman.dist %>']
assetsDirs: ['<%%= yeoman.dist %>']
}
},
imagemin: {
Expand Down Expand Up @@ -307,9 +307,9 @@ module.exports = function (grunt) {
dist: {
files: [{
expand: true,
cwd: '<%%= yeoman.dist %>/scripts',
cwd: '.tmp/concat/scripts',
src: '*.js',
dest: '<%%= yeoman.dist %>/scripts'
dest: '.tmp/concat/scripts'
}]
}
},
Expand Down Expand Up @@ -352,9 +352,9 @@ module.exports = function (grunt) {
'concurrent:dist',
'autoprefixer',
'concat',
'ngmin',
'copy:dist',
'cdnify',
'ngmin',
'cssmin',
'uglify',
'rev',
Expand Down
15 changes: 8 additions & 7 deletions templates/common/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
"name": "<%= _.slugify(_.humanize(appname)) %>",
"version": "0.0.0",
"dependencies": {
"angular": "~1.0.8",
"angular": "~1.2.0",
"json3": "~3.2.4",<% if (bootstrap) { %>
"jquery": "~1.10.0",
"sass-bootstrap": "~3.0.0",
<% } %>"es5-shim": "~2.0.8"<% if (resourceModule) { %>,
"angular-resource": "~1.0.7"<% } %><% if (cookiesModule) { %>,
"angular-cookies": "~1.0.7"<% } %><% if (sanitizeModule) { %>,
"angular-sanitize": "~1.0.7"<% } %>
<% } %>"es5-shim": "~2.1.0"<% if (resourceModule) { %>,
"angular-resource": "~1.2.0"<% } %><% if (cookiesModule) { %>,
"angular-cookies": "~1.2.0"<% } %><% if (sanitizeModule) { %>,
"angular-sanitize": "~1.2.0"<% } %><% if (routeModule) { %>,
"angular-route": "~1.2.0"<% } %>
},
"devDependencies": {
"angular-mocks": "~1.0.7",
"angular-scenario": "~1.0.7"
"angular-mocks": "~1.2.0",
"angular-scenario": "~1.2.0"
}
}
32 changes: 16 additions & 16 deletions templates/common/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-autoprefixer": "~0.4.0",
"grunt-concurrent": "~0.4.1",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-compass": "~0.5.0",
"grunt-contrib-jshint": "~0.6.0",
"grunt-contrib-cssmin": "~0.6.0",
"grunt-contrib-compass": "~0.6.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-cssmin": "~0.7.0",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-imagemin": "~0.2.0",
"grunt-contrib-imagemin": "~0.3.0",
"grunt-contrib-jshint": "~0.7.1",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-watch": "~0.5.2",
"grunt-autoprefixer": "~0.2.0",
"grunt-usemin": "~0.1.11",
"grunt-svgmin": "~0.2.0",
"grunt-rev": "~0.1.0",
"grunt-concurrent": "~0.3.0",
"load-grunt-tasks": "~0.1.0",
"grunt-google-cdn": "~0.2.0",
"grunt-ngmin": "~0.0.2",
"time-grunt": "~0.1.0",
"jshint-stylish": "~0.1.3"
"grunt-rev": "~0.1.0",
"grunt-svgmin": "~0.2.0",
"grunt-usemin": "~2.0.0",
"jshint-stylish": "~0.1.3",
"load-grunt-tasks": "~0.2.0",
"time-grunt": "~0.2.0"
},
"engines": {
"node": ">=0.8.0"
Expand Down

0 comments on commit 77082c6

Please sign in to comment.