Skip to content

Commit

Permalink
Add reference to ExecJS in JavaScript Compression section
Browse files Browse the repository at this point in the history
  • Loading branch information
guilleiguaran committed Sep 1, 2011
1 parent 418e321 commit fdf2f51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion railties/guides/source/asset_pipeline.textile
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ config.assets.css_compressor = :yui

The +config.assets.compress+ must be set to +true+ to enable CSS compression

h4. JavaScript
h4. JavaScript Compression

Possible options for JavaScript compression are +:closure+, +:uglifier+ and +:yui+. These require the use of the +closure-compiler+, +uglifier+ or +yui-compressor+ gems respectively.

Expand All @@ -440,6 +440,8 @@ config.assets.js_compressor = :uglifier

The +config.assets.compress+ must be set to +true+ to enable JavaScript compression

NOTE: You will need a "ExecJS":https://github.com/sstephenson/execjs#readme - supported runtime in order to use +uglifier+. If you are using Mac OS X or Windows you have a JavaScript engine in your operating system. Check "ExecJS":https://github.com/sstephenson/execjs#readme documentation to know all supported JavaScript runtimes.

h4. Using Your Own Compressor

The compressor config settings for CSS and JavaScript also take any Object. This object must have a +compress+ method that takes a string as the sole argument and it must return a string.
Expand Down

0 comments on commit fdf2f51

Please sign in to comment.