Sprockets preprocessor for Google's Closure tools.
Integrating with Rails 3
The gem ships with a Railtie which will automatically register a Closure preprocessor. From here, two more steps:
Download the latest version of closure library from Google and put it in
- Write some closure code!
If you decided to put your
closure-library directory somewhere other than
vendor/assets, then you'll have to update your environment config with the right path:
config.closure.lib = 'vendor/assets/path/to/closure-library'
Using Closure Compressor for Minification
# in your Gemfile gem 'closure-compiler'
# in your environment configuration config.assets.js_compressor = Closure::Compiler.new
(MIT License) - Copyright (c) 2011 Ilya Grigorik