Optimize Requirejs Front-end Application
Solution 1:
No, you can't combine both scripts given that in the first one you're just optimizing one file (that's why the optimization is creating a single file : the 'out' parameter) and in the second one you're optimizing a whole directory (that's why you're using the 'dir' parameter to copy all the optimized resources). Actually, using both 'dir' and 'out' parameters in the same script should produce an error when you launch the optimization.
With the second script use you'll have the main.js optimized in the js-built directory, why aren't you using just that one ?
Also those parameters could be useful to you in your script :
optimizeCss: 'standard' (uglify css files),
removeCombined: true (remove files that have been included in others during the optimization)
Have a look at this website for more info.
Post a Comment for "Optimize Requirejs Front-end Application"