README.md in bower-rails-0.7.0 vs README.md in bower-rails-0.7.1
- old
+ new
@@ -20,24 +20,24 @@
**Install**
in Gemfile
``` Ruby
- gem "bower-rails", "~> 0.7.0"
+ gem "bower-rails", "~> 0.7.1"
```
##JSON configuration
Bower-rails now supports the standard [bower package](https://github.com/bower/bower#defining-a-package) format out-of-the-box. Simply place your bower.json file the Rails root directory to start. Using the standard format will default all bower components to be installed under the `vendor` directory.
To install dependencies into both `lib` and `vendor` directories, run the initializer to generate a custom bower.json:
``` Bash
- rails g bower_rails:initialize
+ rails g bower_rails:initialize json
```
-This will generate a special bower.json that combines two standard bower packages into one. Simply specify your dependencies under each folder name to install them into the corresponding directories.
+This will generate a `config/initializers/bower_rails.rb` config file and a special bower.json that combines two standard bower packages into one. Simply specify your dependencies under each folder name to install them into the corresponding directories.
**example bower.json file**
``` javascript
{
@@ -57,12 +57,18 @@
}
```
##Ruby DSL configuration
-The Ruby DSL configuration is a Bowerfile at the project's root with DSL syntax similar to Bundler.
+The Ruby DSL configuration is a Bowerfile at the project's root with DSL syntax similar to Bundler.
+Run the initializer to generate a sample Bowerfile inside the Rails root and a `config/initializers/bower_rails.rb` config file:
+
+``` Bash
+ rails g bower_rails:initialize
+```
+
**Example Bowerfile**
By default assets are put to `./vendor/assets/bower_components` directory:
``` ruby
@@ -88,16 +94,16 @@
assets_path "assets/javascript"
# Puts files under ./vendor/assets/js/bower_components
group :vendor, :assets_path => "assets/js" do
asset "jquery" # Assummes it's latests
- asset "backbone", "1.2"
+ asset "backbone", "1.1.1"
end
# Puts files under ./lib/assets/javascript/bower_components
group :lib do
asset "jquery"
- asset "backbone", "1.2"
+ asset "backbone", "1.1.1"
end
```
NOTE: Available groups are `:lib` and `:vendor`. Others are not allowed according to the Rails convention.
NOTE: All the assets should be stored in `/assets` subdirectory so putting it under `./vendor/js` directory is unavailable