Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Monkey Patches javascript_include_tag...:cache =>... to use jsmin for optimized javascript
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tasks
test
.project
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

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
Something went wrong with that request. Please try again.