README.md in sinatra-bundles-0.1.1 vs README.md in sinatra-bundles-0.1.2
- old
+ new
@@ -18,22 +18,28 @@
./stylesheets/grid.css
./javascripts/jquery.js
./javascripts/lightbox.js
./javascripts/blog.js
-You can bundle these files in your app like this:
+You can bundle these files in your app like this. First, install the gem
+ % [sudo] gem install sinatra-bundles
+
+And include it in your app:
+
require 'sinatra'
require 'sinatra/bundles'
stylesheet_bundle(:all, %w(reset fonts grid))
javascript_bundle(:all, %w(jquery lightbox blog))
get '/' do
'sinatra-bundles rocks!'
end
+That sinatra is version 0.10.1, so you'll have to grab it from source and install it that way, since it's not out yet.
+
Then in your view, you can use the view helpers to insert the proper script tags:
= javascript_bundle_include_tag(:all)
= stylesheet_bundle_link_tag(:all)
@@ -77,10 +83,14 @@
Check out the code for my blog for a real example: [darkblog on github](http://github.com/darkhelmet/darkblog)
What you Need
-------------
-sinatra >= 0.10.1 (edge)
+ sinatra >= 0.10.1 (edge)
+ packr
+ rainpress
+
+packr and rainpress are dependencies, but sinatra isn't, since version 0.10.1 isn't out yet, and you have to download the source manually.
Note on Patches/Pull Requests
-----------------------------
* Fork the project.