Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 .project
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 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.