Goal:
I am trying to run a watch
task in my Gruntfile.js
as a daemon.
Normally, I would execute this script like: grunt watch
.
Gruntfile.js:
module.exports = function(grunt) {
grunt.initConfig({
concat: {
options: {
separator: ''
},
dist: {
src: ['static/js/**/*.js'],
dest: 'app.js'
}
},
watch: {
files: ['<%= concat.dist.src %>'],
tasks: ['concat']
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
};
Question:
How do I spawn grunt watch
as a daemon?
Update:
It appears as though considerations for this have already been made:
https://github.com/shama/grunt-hub#watching-forever
https://github.com/shama/grunt-hub/issues/3