generator-ionic icon indicating copy to clipboard operation
generator-ionic copied to clipboard

grunt clean doesn't work

Open rsippl opened this issue 9 years ago • 2 comments

"grunt clean" is supposed to clean the www directory, but it doesn't (although it seems to do quite a lot).

Adding this line at the end of Gruntfile.js fixes it for me:

grunt.loadNpmTasks('grunt-contrib-clean');

IIUC, this should be added to templates/common/_Gruntfile.js.

rsippl avatar Sep 17 '15 17:09 rsippl

This issue causes some trouble. For example, "grunt serve:compress" uses the production environment (which is fine) but a subsequent "grunt serve" doesn't switch back to development.

rsippl avatar Sep 17 '15 17:09 rsippl

Looks like cordova-cli 5.2 add a clean command which is loaded after the grunt-contrib-clean task.

https://github.com/apache/cordova-cli/commit/9fcc4e6ff92ce858735b407107c52d5c6c381295

It's kind of hacky but during the 'Register tasks for all Cordova commands' I just leave out the clean command

scottmizo avatar Nov 10 '15 02:11 scottmizo