- Scan for syntax errors with ESLint and other tools.
- Transpile with Babel.
- Minify with UglifyJS.
- Concatenate multiple files together (below).
Combining files reduces the number of round-trip requests between the browser and server, which makes pages load faster.
Special comments in your JS files tell CodeKit how to combine them. These comments let you prepend or append one JS file to another. They look like this:
// @codekit-prepend "someFile.js"; ... // @codekit-append "../someOtherFile.js";
You can also combine multiple files at once with a comma-separated list:
// @codekit-prepend "jQuery.js", "../otherFile.js";