Skip to content

Commit 92aec8b

Browse files
committed
grunt - running connect & watch in tandem
1 parent 62ad700 commit 92aec8b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎Gruntfile.js‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,27 @@ module.exports = function (grunt) {
8080
options: {
8181
port: 3030,
8282
base: '.',
83-
keepalive: true,
83+
keepalive: false,
8484
livereload:true,
8585
open: true
8686
}
8787
}
88+
},
89+
90+
watch: {
91+
scripts: {
92+
files: ['app/**/*.js','*.html'],
93+
tasks: ['build'],
94+
options: {
95+
livereload: true
96+
}
97+
}
8898
}
8999
};
90100

91101
grunt.initConfig(grunt.util._.extend(taskConfig, userConfig));
92102

93-
grunt.registerTask('default', [ 'connect']);
103+
grunt.registerTask('default', [ 'connect', 'watch']);
94104

95105
grunt.registerTask('build', [
96106
'jshint', 'concat', 'uglify'

0 commit comments

Comments
 (0)