Aggregation with Sprockets
summary
Sprockets provides a Ruby asset pipeline that concatenate+precompile via Sprockets Rails or run as a CGI, emits one consolidated asset and ships rake tasks for Capistrano deployment; it pairs with YUI Compressor (JAR) with munch option for safe minification. An example project with ~60 JS files at three–four directory levels consolidates to one file, and a Prototype+script.aculo.us sample drops from ~300k to about 10% after YUI + gzip. Apache config recommendations include long expiry, public cache control, and dropping ETags for CDN friendliness.
AI-written summary · about
chapters (9)
- 0:00Start
- 4:51or use Rails!
- 6:06Hey, like to squeeze?
- 6:38YUI Compressor
- 8:21The gem wrapper
- 9:41A match made in heaven
- 10:32So what's left?
- 12:06Apache config you'll love
- 14:07Numbers!
related talks
29mRails Asset Pipeline: Defunct or Da Funk
30mHow Sprockets works
20mMaster the Rails Asset Pipeline: Best Practices for Apps & Gems
34mFrom Sprockets to js-bundling: Evolution of JavaScript tooling in Rails!
17mWebpacker vs Asset Pipeline
24mPropshaft and the Modern Asset Pipeline
11mOrganizing and Packaging Rich Javascript Apps with Ruby
25mMAKING JAVASCRIPT GREAT AGAIN IN RAILS
