Created
April 20, 2016 15:46
-
-
Save patrickwhardy/6132ca7e25fc555b87bff041fc105bd4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* concatenation takes the contents of multiple assets and puts them in to a single file i.e. "output/main.js. | |
Given | |
the file "input/a.js" contains | |
var a = 1; | |
And | |
the file "input/b.js" contains | |
var b = 2; | |
#Concatenate! | |
the file "output/main.js" should contain | |
/* Made by Computer Corp. LLC */ | |
var a = 1;var b = 2; | |
* bundle exec rake assets:precompile | |
This will create (by default) an assets directory in your public/ folder. It will then add all the compressed and compiled files into that directory, in the appropriate formats and with the new digested versions | |
*Minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser - e.g. code comments and formatting, removing unused code, using shorter variable and function names, and so on. | |
*The page rendered is a compiled version of all js in the application, whereas the file in our application is a placeholder for where these will be compiled | |
*A manifest uses directives to declare dependencies in asset source files. catch-em-all has application.js and application.css | |
*We use javascript_include_tag and stylesheet_link_tag and it gets used in layout/application | |
*Fingerprinting is a technique that makes the name of a file dependent on the contents of the file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👍