Closed Yimiprod closed 9 years ago
One solution could be to add a task to the grunt file that goes over the dist folder right after copying all files to it and remove all not minified files from it. If all your inlcuded/minified files contain something like .min. in there name then you could remove all not so named.
I have found another solution, using grunt too, i've added wiredep and usemin. Wiredep add script tag and css link in my html. Then useminPrepare take the path and store all the js/css in a .tmp folder. Grunt copy my html/fonts/images/package.json in a buildApp folder. Usemin minify my css and js from .tmp and copy thoses minified files int buildApp folder.
Then all the grunt appbuild take the app from buildApp folder instead of the app folder.
If you want i can copy paste the final gruntfile, i'm going to upgrade it to do the same, later, with the node_modules.
It would be nice if you could add a pull request with some template added using your solution. Thank you sounds good to me.
For the need of my project, i have installed via npm some new node_modules, when packaging the apply, it take all the node_module folder, grunt included, instead of only the minified version of the modules i need.
How i can modify my gruntfile to do that for a windows / mac app build?