Monkey Patches javascript_include_tag...:cache =>... to use jsmin for optimized javascript
License
jkotchoff/minified_cache
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DESCRIPTION =========== This monkey patch of ActionView::Helpers::AssetTagHelper uses the jsmin library to minify cached javascript so that you can pass the YSlow test! When you call: <%= javascript_include_tag 'application', 'other_js_source', :cache => 'application_cached' %> then the resulting generated #{RAILS_ROOT}/public/javascripts/application_cached.js will be served minified (assuming config.action_controller.perform_caching = true) INSTALLATION ============= git clone git://github.com/cornflakesuperstar/minified_cache.git vendor/plugins/minified_cache && rm -rf vendor/plugins/minified_cache/.git WARNING ======= In order to minify your javascript, it must be formatted with appropriate function closure and braces eg: if(condition) alert('msg') else alert('othermsg') is handled gracefully by browsers (thanks to the newline), however when it gets compressed to: if(condition) alert('msg')else alert('othermsg') you can expect some kaboom. check out http://www.jslint.com/ to verify your scripts HOMEPAGE ======== http://www.kangarooit.com/minified_cache Copyright (c) 2009 Jason Kotchoff, released under the MIT license
About
Monkey Patches javascript_include_tag...:cache =>... to use jsmin for optimized javascript
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published