diff options
author | Mohammad Typaldos <mohammad.elabid@gmail.com> | 2011-06-20 23:23:55 -0700 |
---|---|---|
committer | Mohammad Typaldos <mohammad.elabid@gmail.com> | 2011-06-20 23:23:55 -0700 |
commit | 2d4d9f1937af42d76bd7ebb5297d9b2564067c37 (patch) | |
tree | 7315c6363d98833779ce76c184857f8c6a9ef4a3 /railties/guides | |
parent | d3b7f4912ba9df0297d36068e7021c795d9b1ec0 (diff) | |
download | rails-2d4d9f1937af42d76bd7ebb5297d9b2564067c37.tar.gz rails-2d4d9f1937af42d76bd7ebb5297d9b2564067c37.tar.bz2 rails-2d4d9f1937af42d76bd7ebb5297d9b2564067c37.zip |
Edited railties/guides/source/asset_pipeline.textile via GitHub
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/asset_pipeline.textile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile index 0dfa4be292..815d4e096d 100644 --- a/railties/guides/source/asset_pipeline.textile +++ b/railties/guides/source/asset_pipeline.textile @@ -92,8 +92,13 @@ Keep in mind that the order of these pre-processors is important. For example, i h4. Compressing Assets -WIP: Compressed Assets in Rails are served ... how? +The default Gemfile also includes the "uglifier":https://github.com/lautis/uglifier gem. This gem wraps "UglifierJS":https://github.com/mishoo/UglifyJS (written for NodeJS) in Ruby. It compress your code by removing white spaces and other magical things like changing your if and else statements to ternary operators when possible. h4. Adding Assets to Your Gems +To include your assets inside of a gem, simple package it in +lib/assets+ as you would in +app/assets+. You should append or prepend the name of your gem though, this should help avoid name conflicts with other gems or the user's application. + h4. Making Your Library or Gem a Pre-Processor + +"You should be able to register [your gems] on Tilt and Sprockets will find them." - Josh +Tilt: https://github.com/rtomayko/tilt
\ No newline at end of file |