~/talk

How Sprockets works

Talkat RailsConf 2016 · 2016-05-04..05-06· [ruby-on-rails, frontend-architecture]
slides:none on file

Explains how Sprockets composes processors, transformers and compressors into the default pipeline that builds assets, how the environment and manifest map logical paths to fingerprinted files, and how development uses the debug pipeline with source maps while production relies on precompile. Shows concrete tools used: Babel, CoffeeScript, Sass, execjs, sprockets-rails, and code for registering processors. Demonstrates real extensions such as an NPM directive to pull node_modules and an automatic SVG to PNG conversion at precompile, with examples of implementation and how the bundle processor concatenates required files.

AI-written summary · about

  1. 0:00How Sprockets works
  2. 0:58RAILS Maintainer
  3. 3:49Code organization X Performance
  4. 4:06Small self-contained files
  5. 6:00Processors pipeline
  6. 6:28Most important component in Sprockets
  7. 10:24Compressor
  8. 14:03It has methods to retrieve and serve assets, manipulating load path, and registering processors.
  9. 15:15Points the asset path to the fingerprinted version
  10. 16:59Integrates Sprockets to the Rails application
  11. 17:13Configures the Sprockets environment
  12. 17:24Checks the precompile list
  13. 19:13It allows you to run JavaScript code from Ruby
  14. 20:04It is used by the coffee-script gem to compile CoffeeScript code
  15. 20:25Defines a template handler
  16. 20:41How the assets are generated in development.
  17. 21:21sprockets-rails use the Sprockets' pipeline 'debug
  18. 22:08To build the asset bundle the default pipeline is used
  19. 23:07To compile the required files the self pipeline is used
  20. 24:32The bundler processor merge all of them
  21. 24:44What are the key difference between development and production
  22. 28:33Understand your tools
  23. 28:43Share with the community
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.