Skip to content

Commit 67c0ebf

Browse files
committed
fix(build): update to grunt-contrib-connect 0.5.0
This allows the removal of grunt-open and inlining of the livereload port.
1 parent 368ad7f commit 67c0ebf

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

templates/common/Gruntfile.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>
22
'use strict';
3-
var LIVERELOAD_PORT = 35729;
43

54
// # Globbing
65
// for performance reasons we're only matching one level down:
@@ -43,7 +42,7 @@ module.exports = function (grunt) {
4342
},
4443
livereload: {
4544
options: {
46-
livereload: LIVERELOAD_PORT
45+
livereload: '<%%= connect.options.livereload %>'
4746
},
4847
files: [
4948
'<%%= yeoman.app %>/{,*/}*.html',
@@ -68,11 +67,12 @@ module.exports = function (grunt) {
6867
options: {
6968
port: 9000,
7069
// Change this to '0.0.0.0' to access the server from outside.
71-
hostname: 'localhost'
70+
hostname: 'localhost',
71+
livereload: 35729
7272
},
7373
livereload: {
7474
options: {
75-
livereload: LIVERELOAD_PORT,
75+
open: true,
7676
base: [
7777
'.tmp',
7878
yeomanConfig.app
@@ -94,11 +94,6 @@ module.exports = function (grunt) {
9494
}
9595
}
9696
},
97-
open: {
98-
server: {
99-
url: 'http://localhost:<%%= connect.options.port %>/index.html'
100-
}
101-
},
10297
clean: {
10398
dist: {
10499
files: [{
@@ -335,15 +330,14 @@ module.exports = function (grunt) {
335330

336331
grunt.registerTask('server', function (target) {
337332
if (target === 'dist') {
338-
return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
333+
return grunt.task.run(['build', 'connect:dist:keepalive']);
339334
}
340335

341336
grunt.task.run([
342337
'clean:server',
343338
'concurrent:server',
344339
'autoprefixer',
345340
'connect:livereload',
346-
'open',
347341
'watch'
348342
]);
349343
});

templates/common/_package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"grunt-contrib-compass": "~0.5.0",
1212
"grunt-contrib-jshint": "~0.6.0",
1313
"grunt-contrib-cssmin": "~0.6.0",
14-
"grunt-contrib-connect": "~0.4.0",
14+
"grunt-contrib-connect": "~0.5.0",
1515
"grunt-contrib-clean": "~0.5.0",
1616
"grunt-contrib-htmlmin": "~0.1.3",
1717
"grunt-contrib-imagemin": "~0.2.0",
@@ -20,7 +20,6 @@
2020
"grunt-usemin": "~0.1.11",
2121
"grunt-svgmin": "~0.2.0",
2222
"grunt-rev": "~0.1.0",
23-
"grunt-open": "~0.2.0",
2423
"grunt-concurrent": "~0.3.0",
2524
"load-grunt-tasks": "~0.1.0",
2625
"grunt-google-cdn": "~0.2.0",

0 commit comments

Comments
 (0)