I'm defining a Grunt project with multiple tasks and targets, with task build
, I would like to run some copy targets, and then with task deployment
, I also want to run copy
however with some other targets (only copy folder to specific directory for deployment for example), and I don't want to execute this target at build
task.
So how can I skip this Grunt target from the build
Here is my example
grunt.registerTask('build', ['clean', 'copy']);
grunt.registerTask('deployment', ['copy:deployment']);
grunt.initConfig(
{
copy: {
foo: // Do something here,
bar: // Do anothering here,
....
deployment: // Copy file and execute something for deployment target.
},
}
);