What does it mean to concatenate files? Find an image of an example concatenated file. Why would we want to concatenate files?
- appending one file to another file
- turns sass in css, coffeescript into js, erb into html before needing them to save time/bandwidth
What does it mean to minify files? Find an image of an example minified file. Why would we want to minify files?
- http://cdn.speedrak.com/images/blog-images/seoblogger-after-minify-css.PNG
- Minifying files means to strip whitespace and unnecessary comments/information
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?
- I'm not sure, but I think it has something to do with pre-compiling?
What is a manifest (in terms of the asset pipeline)? Where can you find two manifests in Catch 'em All?
- A manifest is what the asset pipeline uses in order to determine what to include vs serve
- application.js & application.css
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?
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
- in application.html.erb
- It is a way to determine if a file has changed. Filename is dependent on file contents, creates a fingerprint. if the fingerprint is changed, the file is reserved to the client
👍