Skip to content

Commit 314f051

Browse files
committed
Modified Gruntfile.js to live reload project
It can run watch with livereload and connect server at the same time.
1 parent 4c4fdd2 commit 314f051

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Gruntfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ function initializeGruntConfig(grunt) {
9898
watch: {
9999
files: [SRC_DIR + '/**'],
100100
tasks: ['test'],
101-
options: { nospawn: true}
101+
options: {
102+
nospawn: true,
103+
livereload: true
104+
}
102105
},
103106

104107
// Unit tests
@@ -111,8 +114,7 @@ function initializeGruntConfig(grunt) {
111114
server: {
112115
options: {
113116
port: 8000,
114-
base: '.',
115-
keepalive: true
117+
base: '.'
116118
}
117119
}
118120
},
@@ -201,6 +203,6 @@ module.exports = function (grunt) {
201203
grunt.registerTask("build-production", ["version", "test", "uglify"]);
202204
grunt.registerTask('build', ['concat', 'copy', 'umd', 'cssmin']);
203205
grunt.registerTask('test', ['build','jshint', 'qunit']);
204-
grunt.registerTask("default", ["test", "watch"]);
206+
grunt.registerTask("default", ["test", "connect", "watch"]);
205207
grunt.registerTask("prepublish", ["test", "uglify"]);
206208
};

0 commit comments

Comments
 (0)