diff --git a/app/index.js b/app/index.js index d1279b4df..50ab74f1e 100644 --- a/app/index.js +++ b/app/index.js @@ -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, @@ -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 }] }]; @@ -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 = []; @@ -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"; @@ -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); diff --git a/templates/common/Gruntfile.js b/templates/common/Gruntfile.js index bd2734c9c..354853aa6 100644 --- a/templates/common/Gruntfile.js +++ b/templates/common/Gruntfile.js @@ -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: { @@ -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' }] } }, @@ -352,9 +352,9 @@ module.exports = function (grunt) { 'concurrent:dist', 'autoprefixer', 'concat', + 'ngmin', 'copy:dist', 'cdnify', - 'ngmin', 'cssmin', 'uglify', 'rev', diff --git a/templates/common/_bower.json b/templates/common/_bower.json index a45d6cb7d..d15be0faf 100644 --- a/templates/common/_bower.json +++ b/templates/common/_bower.json @@ -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" } } diff --git a/templates/common/_package.json b/templates/common/_package.json index bc03d0841..747eb160f 100644 --- a/templates/common/_package.json +++ b/templates/common/_package.json @@ -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"