After kicking the boot around for a while I finally decided to re-factor the asset pipeline. The functionality is all in all the same but the code is easier on the eyes. However, I did bring in a lot of new features.
- Config allows you to control caching interface
- Config allows you to control directives
- Config allows you to control which environments are concatenated
- Use a sprockets parser and generator to create the Rails-style asset pipeline functionality
- Use relative paths in the manifest files
- Use Laravel event listener to alter the configuration of the pipeline after package boot/start up
- Use caching to speed up local development when using a lot of pre-processors (i.e. coffee, less, sass)
- Use assets:generate to create static files in public/assets directory.
- Completely customize the AssetController class
As it stands right now the css minifier out of the box breaks when trying to minify Twitter Bootstrap 3 code because there is a @-moz-tag in the css. To get around this I use bootstrap.min.css because pipeline skips minification on .min. files.
New comers may not know this though and be confused or frustrated when all their styles break after trying to minify bootstrap css.
That’ll do for now pig, that’ll do.