Links
Bundle-fu
Categories
Bundle-fu
RAILS 2.0 READY!

You’ve already built your website, and it’s ready to be deployed. However, you notice over the process of building the website, you’ve accrued quite a few javascript and css includes! This is detrimental to your sites performance. What to do?
Bundle-fu!
You’ve already written your css/js includes. Bundle-fu leverages this to create a bundling solution made possible at the cost of 2 extra small lines of code. Simply surround your js / css includes with <% bundle do > ... < end %>, and bundle-fu does the rest.
Sounds too cool to be true? Give it a try!

You’ve already built your website, and it’s ready to be deployed. However, you notice over the process of building the website, you’ve accrued quite a few javascript and css includes! This is detrimental to your sites performance. What to do?
Bundle-fu!
You’ve already written your css/js includes. Bundle-fu leverages this to create a bundling solution made possible at the cost of 2 extra small lines of code. Simply surround your js / css includes with <% bundle do > ... < end %>, and bundle-fu does the rest.
Sounds too cool to be true? Give it a try!
What makes bundle-fu special?.
It:
- Does not require a separate config file
- Automatically regenerates the bundle if you modify an included file, or change the include order.
- Is easily bypassed by passing ”?bundle_fu=false” into your page (including assets separately vs bundled). It does not affect other users of your site, and stays bypassed for the your session only. Bundle-fu makes debugging fun!
- Is optimized for production mode (only generates the bundle file once when the server is first started).
- Puts the bundles in javascripts/cache and stylesheets/cache, so it’s easy to ignore with subversion.
- Rewrites relative URLs in your CSS files, so you’ll never have broken images.
- Minimizes your javascripts by default using the Ruby Version of JSMin . Optionally, if you install PackR, it will automatically use that instead.
- No additional load on your rails application – bundled files are served as static files.
Documentation, FAQ & Caveats on the website.
Vitals
| Home | http://code.google.com/p/bundle-fu/ |
|---|---|
| Repository | http://bundle-fu.googlecode.com/svn/tags/bundle_fu |
| License | Rails' (MIT) |
| Tags |
|
| Rating | (7 votes) |
| Owner | Tim Harper |
| Created | 29 October 2007 |
Comments
-
Neat idea, doesn't seem to work with the Blueprint CSS framework though with their plugin architecture.
-
What doesn't work about it?
-
Bundle-fu works in Rails 2.0

