Skip to content

Commit

Permalink
fix(build): update to grunt-contrib-connect 0.5.0
Browse files Browse the repository at this point in the history
This allows the removal of grunt-open and inlining of the livereload port.
  • Loading branch information
passy committed Sep 9, 2013
1 parent 368ad7f commit 67c0ebf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
16 changes: 5 additions & 11 deletions templates/common/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -43,7 +42,7 @@ module.exports = function (grunt) {
},
livereload: {
options: {
livereload: LIVERELOAD_PORT
livereload: '<%%= connect.options.livereload %>'
},
files: [
'<%%= yeoman.app %>/{,*/}*.html',
Expand All @@ -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
Expand All @@ -94,11 +94,6 @@ module.exports = function (grunt) {
}
}
},
open: {
server: {
url: 'http://localhost:<%%= connect.options.port %>/index.html'
}
},
clean: {
dist: {
files: [{
Expand Down Expand Up @@ -335,15 +330,14 @@ 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([
'clean:server',
'concurrent:server',
'autoprefixer',
'connect:livereload',
'open',
'watch'
]);
});
Expand Down
3 changes: 1 addition & 2 deletions templates/common/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 67c0ebf

Please sign in to comment.