Skip to content

Instantly share code, notes, and snippets.

@edilenedacruz
Last active February 23, 2017 17:01
Show Gist options
  • Save edilenedacruz/b48ef1506db62407e66bd7c129cfc044 to your computer and use it in GitHub Desktop.
Save edilenedacruz/b48ef1506db62407e66bd7c129cfc044 to your computer and use it in GitHub Desktop.
Asset Pipeline Scavenger Hunt
  1. What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files? It means to bring files together, in one place.

  2. What does it mean to precompile files? What does this have to do with coffeescript and sass files? Precompile files is to use/convert a higher languange into a web browser deliverable language.

  3. What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files? It means to strip out the trailing whitespaces.

  4. Start up the server for Catch ‘em All (rails s) and navigate to http://localhost:3000/assets/application.js. Then open up the code for application.js in your text editor. Why are these not the same? Because the file in the editor will require other files (concatenate files)

  5. What is a manifest (in terms of the asset pipeline)? Where can you find two manifests in Catch ‘em All?

  6. In regular HTML files, we bring in css files with . How is this done in a Rails project? Where do you see this line in Catch ‘em All?

  7. How is a digest/fingerprint used on the assets for caching purposes?

  8. Done? Take a look at RailsGuides: The Asset Pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment