My favorites | Sign in
Project Logo
             
Search
for
Updated Dec 15, 2007 by timcharper
Labels: Featured
Documentation  

Requirements

Ruby on Rails framework, 1.2 or greater.

bundle option parameters

The following parameters can be passed into <% bundle do %>, for example:

  bundle :name => "admin_asset_bundle", :css_path => "/temp/", :js_path => "/temp/" do 
  • :name - Changes the name of the bundle file generated. This is useful if you have several different combinations of bundled files. See the FAQ for more information.
  • :css_path - Changes the folder where the bundled css files are stored. Default: "/stylesheets/cache"
  • :js_path - Changes the folder where the bundled js files are stored. Default: "/javascripts/cache"
  • :compress - Enable / disable compression. Default: true
  • :bundle_fu - Enable / disable bundling. Overrides the "?bundle_fu=true" querystring
  • :packr_options - Set the options hash passed into PackR#pack

PackR Support

If you install PackR, bundle_fu will automatically detect that it's installed and use that to compress the javascript.

You can control the options passed to PackR as following:

bundle_fu :packr_options => {:shrink_vars => false, :base62 => false}

If you have issues with PackR, please refer to the PackR

FAQ

Frequently Asked Questions


Comment by realjax, Nov 09, 2007

You might want to mention more obvious that we are dealing here with a Ruby on Rails plugin. It took me a while before I could put one and one together and fill in the system requirements.. But then again, I am not a ROR man..

Comment by blat...@theblatherskite.com, Dec 16, 2007

A quick note that the syntax under "bundle option parameters" is incorrect -- the options come before the do, like so

  <% bundle :name => "admin_asset_bundle", :css_path => "/temp/" do %>
Comment by rogerpack2005, Jan 30, 2008

Might be nice to have links to other 'cool' asset plugins (like those that help it actually cache the js page or what not) for really speedy. Also nice would be (?) a plugin that replaced render :partial => with the actual ruby code for that page--i.e. does what you do for every ruby template itself. Wonder if that would help with rails speed or not. Prolly not much, but hey :)

Comment by rafudu, Jun 17, 2008

Hi There! Congrats for the awesome plugin. You could document the :bypass option, as an option to turn-off bundle_fu in the development environment, for instance. Something like:

:bypass=> (ENV['RAILS_ENV'] != 'production')

Sign in to add a comment
Hosted by Google Code