diff --git a/templates/common/Gruntfile.js b/templates/common/Gruntfile.js index 29c0414..59b9e09 100644 --- a/templates/common/Gruntfile.js +++ b/templates/common/Gruntfile.js @@ -1,6 +1,5 @@ // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %> 'use strict'; -var LIVERELOAD_PORT = 35729; // # Globbing // for performance reasons we're only matching one level down: @@ -43,7 +42,7 @@ module.exports = function (grunt) { }, livereload: { options: { - livereload: LIVERELOAD_PORT + livereload: '<%%= connect.options.livereload %>' }, files: [ '<%%= yeoman.app %>/{,*/}*.html', @@ -68,11 +67,12 @@ module.exports = function (grunt) { options: { port: 9000, // Change this to '0.0.0.0' to access the server from outside. - hostname: 'localhost' + hostname: 'localhost', + livereload: 35729 }, livereload: { options: { - livereload: LIVERELOAD_PORT, + open: true, base: [ '.tmp', yeomanConfig.app @@ -94,11 +94,6 @@ module.exports = function (grunt) { } } }, - open: { - server: { - url: 'http://localhost:<%%= connect.options.port %>/index.html' - } - }, clean: { dist: { files: [{ @@ -335,7 +330,7 @@ module.exports = function (grunt) { grunt.registerTask('server', function (target) { if (target === 'dist') { - return grunt.task.run(['build', 'open', 'connect:dist:keepalive']); + return grunt.task.run(['build', 'connect:dist:keepalive']); } grunt.task.run([ @@ -343,7 +338,6 @@ module.exports = function (grunt) { 'concurrent:server', 'autoprefixer', 'connect:livereload', - 'open', 'watch' ]); }); diff --git a/templates/common/_package.json b/templates/common/_package.json index c5461ae..1742c29 100644 --- a/templates/common/_package.json +++ b/templates/common/_package.json @@ -11,7 +11,7 @@ "grunt-contrib-compass": "~0.5.0", "grunt-contrib-jshint": "~0.6.0", "grunt-contrib-cssmin": "~0.6.0", - "grunt-contrib-connect": "~0.4.0", + "grunt-contrib-connect": "~0.5.0", "grunt-contrib-clean": "~0.5.0", "grunt-contrib-htmlmin": "~0.1.3", "grunt-contrib-imagemin": "~0.2.0", @@ -20,7 +20,6 @@ "grunt-usemin": "~0.1.11", "grunt-svgmin": "~0.2.0", "grunt-rev": "~0.1.0", - "grunt-open": "~0.2.0", "grunt-concurrent": "~0.3.0", "load-grunt-tasks": "~0.1.0", "grunt-google-cdn": "~0.2.0",