Reputation: 543
I'm trying to make a workflow where i can just run grunt deploy
and it minifies images, css, javascript, concatenates all the css and javascript, with usemin, change the include scripts in the html to all the minified files, then finally pushes the changes. The only thing is, the next time i want to edit the files, i want to edit the regular javascript and css files, but the files being included in the html are the minified files. How would i get around this? I was thinking to make a production and development html file and ignore the development html for deployment, but is there a better way?
Upvotes: 1
Views: 2335
Reputation: 26
Give a different deployment folder for production environment and development. That is, when minify, specify the destination(dest) files into another folder which is production root. use 'copy' plugin to copy the html to that folder and 'usemin' to use that html as input.
You may need other plugins to help, 'clean' to clean the files under production before grunt deploy.
The only thing you need do is deploy to different website, grunt with those plugins will help you all the others.
Upvotes: 1