What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files?
- To join together files for fast loading applications.
What does it mean to precompile files? What does this have to do with coffeescript and sass files?
- How Asset Precompile Works
- Creates the assets directory. Pre-processes coffeescript and sass into JS and CSS.
What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files?
- Compress, to save space and memory.
- Minfied CSS
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?
- My program won't let me migrate. Will need to come back to this.
What is a manifest (in terms of the asset pipeline)? Where can you find two manifests in Catch 'em All?
In regular HTML files, we bring in css files with <link rel="stylesheet" href="application.css">
. How is this done in a Rails project? Where do you see this line in Catch 'em All?
How is a digest/fingerprint used on the assets for caching purposes?
Done? Take a look at RailsGuides: The Asset Pipeline.
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?