You can add a watch task that will watch for changed files and keep the server up:
watch: {
options: {
nospawn: true
},
livereload: {
options: {
livereload: LIVERELOAD_PORT
},
files: [
'src/main/*.js',
'src/main/*.html'
]
}
},
and then change the task to be:
grunt.registerTask('default', ['connect:dev', 'open:dev', 'watch']);