Closed raddevon closed 11 years ago
You should be able to do something like the following in your Gruntfile:
module.exports = function(grunt) {
grunt.initConfig({
watch: { /* ... */ },
exec: {
start: { /* ... */ },
stop :{ /* ... */ }
}
});
grunt.registerTaslk('myTask', ['exec:start', 'watch', 'exec:stop']);
};
@jharding That sounds perfect! I wasn't sure if Control-C would exit the entire task or just the currently running sub-task. Thank you.
I have a task that runs a grunt watch, and I would like to execute a command after that watch task has been exited. Is this possible with grunt-exec?
I want grunt-exec to start my MAMP server when my development task is run and then stop it after the watch is exited with Ctrl-C.