Skip to content
This repository
Browse code

Edited railties/guides/source/asset_pipeline.textile via GitHub

  • Loading branch information...
commit 2d4d9f1937af42d76bd7ebb5297d9b2564067c37 1 parent d3b7f49
Mohammad El-Abid authored
7  railties/guides/source/asset_pipeline.textile
Source Rendered
@@ -92,8 +92,13 @@ Keep in mind that the order of these pre-processors is important. For example, i
92 92
 
93 93
 h4. Compressing Assets
94 94
 
95  
-WIP: Compressed Assets in Rails are served ... how? 
  95
+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. 
96 96
 
97 97
 h4. Adding Assets to Your Gems
98 98
 
  99
+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.
  100
+
99 101
 h4. Making Your Library or Gem a Pre-Processor
  102
+
  103
+"You should be able to register [your gems] on Tilt and Sprockets will find them." - Josh 
  104
+Tilt: https://github.com/rtomayko/tilt

0 notes on commit 2d4d9f1

Please sign in to comment.
Something went wrong with that request. Please try again.