Skip to content

Commit ebc056b

Browse files
Add livereload to grunt serve task
1 parent 6782592 commit ebc056b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Gruntfile.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ module.exports = function(grunt) {
5151
// tasks: ['default']
5252
// },
5353
all: {
54+
options: {
55+
livereload: true
56+
},
5457
files: [
5558
'source/_patterns/**/*.mustache',
5659
'source/_patterns/**/*.json',
@@ -81,7 +84,8 @@ module.exports = function(grunt) {
8184
port: 9001,
8285
base: './public',
8386
hostname: 'localhost',
84-
keepalive: true
87+
open: true,
88+
livereload: 35729
8589
}
8690
}
8791
}
@@ -99,9 +103,6 @@ module.exports = function(grunt) {
99103
//travis CI task
100104
grunt.registerTask('travis', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'nodeunit']);
101105

102-
grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect:app']);
103-
//need to get livereload working
104-
//http://www.thecrumb.com/2014/03/16/using-grunt-for-live-reload-revisited/
105-
//http://rhumaric.com/2013/07/renewing-the-grunt-livereload-magic/
106+
grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect', 'watch']);
106107

107108
};

0 commit comments

Comments
 (0)