Answer the question
In order to leave comments, you need to log in
How to configure the execution of grunt plugins for different tasks in different ways?
Grunt is used locally and on the server. It executes the tasks locally:
grunt.registerTask('default', ['concat', 'uglify', 'cssmin', 'htmlmin', 'watch']);
On the server, it does:
grunt.registerTask('deploy', ['concat', 'uglify', 'cssmin, 'htmlmin']);
The problem is that the settings of these plugins specify the destination folder for the files after processing - /dest, but I need to change the file destinations when executing the deploy task.
How to do it?
Answer the question
In order to leave comments, you need to log in
Create subtasks with common settings, but in different ways.
grunt.registerTask('default', ['concat:dev', 'uglify:dev', 'cssmin:dev', 'htmlmin:dev', 'watch:dev']);
grunt.registerTask('deploy', ['concat:prod', 'uglify:prod', 'cssmin:prod', 'htmlmin:prod']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question