Per this question: Setting up rake-pipeline for use with handlebars alongside Google App Engine
I’ve been learning how to use rake-pipeline to manage my assets for use with ember.js (with the gracious help of dudleyf).
What I would like to know is how I might incorporate a minifier into the build process as some sort of rake-pipeline filter. Apologies as I’m not familiar with Ruby, so I might need a little more in depth explanation.
The short answer: use the
YUIJavaScriptCompressor. ThisAssetfile:will take each JavaScript file in your
assetsdirectory and run it through the YUI JavaScript compressor with themungeoption. By default, it will rename each*.jsfile to*.min.js.