diff --git a/templates/common/root/_Gruntfile.js b/templates/common/root/_Gruntfile.js index 7786cd09d..ec35a8d28 100644 --- a/templates/common/root/_Gruntfile.js +++ b/templates/common/root/_Gruntfile.js @@ -12,6 +12,9 @@ module.exports = function (grunt) { // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); + // Needed to serve static files + var serveStatic = require('serve-static'); + // Automatically load required Grunt tasks require('jit-grunt')(grunt, { useminPrepare: 'grunt-usemin', @@ -101,16 +104,16 @@ module.exports = function (grunt) { open: true, middleware: function (connect) { return [ - connect.static('.tmp'), + serveStatic('.tmp'), connect().use( '/bower_components', - connect.static('./bower_components') + serveStatic('./bower_components') ), connect().use( '/app/styles', - connect.static('./app/styles') + serveStatic('./app/styles') ), - connect.static(appConfig.app) + serveStatic(appConfig.app) ]; } } @@ -120,13 +123,13 @@ module.exports = function (grunt) { port: 9001, middleware: function (connect) { return [ - connect.static('.tmp'), - connect.static('test'), + serveStatic('.tmp'), + serveStatic('test'), connect().use( '/bower_components', - connect.static('./bower_components') + serveStatic('./bower_components') ), - connect.static(appConfig.app) + serveStatic(appConfig.app) ]; } } diff --git a/templates/common/root/_package.json b/templates/common/root/_package.json index 781e08be0..acafa2bdd 100644 --- a/templates/common/root/_package.json +++ b/templates/common/root/_package.json @@ -29,35 +29,36 @@ "gulp-coffeelint": "^0.5.0", "gulp-coffee": "^2.3.1",<% } %><% } else { %> "autoprefixer-core": "^5.2.1", - "grunt": "^0.4.5", - "grunt-angular-templates": "^0.5.7", - "grunt-concurrent": "^1.0.0", - "grunt-contrib-clean": "^0.6.0",<% if (coffee) { %> - "grunt-contrib-coffee": "^0.12.0",<% } %><% if (compass) { %> - "grunt-contrib-compass": "^1.0.0",<% } %> - "grunt-contrib-concat": "^0.5.0", - "grunt-contrib-connect": "^0.9.0", - "grunt-contrib-copy": "^0.7.0", + "grunt": "^1.0.1", + "grunt-angular-templates": "^1.1.0", + "grunt-concurrent": "^2.3.1", + "grunt-contrib-clean": "^1.0.0",<% if (coffee) { %> + "grunt-contrib-coffee": "^1.0.0",<% } %><% if (compass) { %> + "grunt-contrib-compass": "^1.1.1",<% } %> + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-connect": "^1.0.2", + "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^1.0.2", - "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-imagemin": "^1.0.0", - "grunt-contrib-jshint": "^0.11.0", - "grunt-contrib-uglify": "^0.7.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-filerev": "^2.1.2", + "grunt-contrib-htmlmin": "^2.0.0", + "grunt-contrib-imagemin": "^1.0.1", + "grunt-contrib-jshint": "^1.1.0", + "grunt-contrib-uglify": "^2.0.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-filerev": "^2.3.1", "grunt-google-cdn": "^0.4.3",<% if (!coffee) { %> - "grunt-jscs": "^1.8.0",<% } %> - "grunt-newer": "^1.1.0", - "grunt-ng-annotate": "^0.9.2", - "grunt-postcss": "^0.5.5", - "grunt-svgmin": "^2.0.0",<% if (typescript) { %> + "grunt-jscs": "^3.0.1",<% } %> + "grunt-newer": "^1.2.0", + "grunt-ng-annotate": "^3.0.0", + "grunt-postcss": "^0.8.0", + "grunt-svgmin": "^4.0.0",<% if (typescript) { %> "grunt-tsd": "^0.1.0", "grunt-typescript": "^0.8.0",<% } %> - "grunt-usemin": "^3.0.0", - "grunt-wiredep": "^2.0.0", - "jit-grunt": "^0.9.1", - "time-grunt": "^1.0.0"<% } %>, - "jshint-stylish": "^1.0.0" + "grunt-usemin": "^3.1.1", + "grunt-wiredep": "^3.0.1", + "jit-grunt": "^0.10.0", + "time-grunt": "^1.4.0"<% } %>, + "jshint-stylish": "^1", + "serve-static":"1.11.1" }, "engines": { "node": ">=0.10.0"