README.md in bower-rails-0.4.4 vs README.md in bower-rails-0.5.0

- old
+ new

@@ -1,9 +1,10 @@ bower-rails =========== -rake tasks for bower on rails. Dependency file is bower.json in Rails root dir. +Bower support for Rails projects. Dependency file is bower.json in Rails root dir or Bowerfile if you use DSL. +Check out Changelog.md for the latest changes and releases. **Requirements** * [node](http://nodejs.org) ([on github](https://github.com/joyent/node)) * [bower](https://github.com/bower/bower) (>= 0.10.0) installed with npm @@ -46,73 +47,58 @@ } } } ``` - -**Available commands** - -``` bash - rake bower:install #install js components - rake bower:install:force #install with force option - rake bower:update #update js components - rake bower:update:prune #update components and uninstall extraneous packages -``` - - ##Ruby DSL configuration -The Ruby DSL configuration is a Jsfile with DSL syntax similar to Bundler. +The Ruby DSL configuration is a Bowerfile at the project's root with DSL syntax similar to Bundler. -**Example Jsfile** +**Example Bowerfile** By default assets are put to `./vendor/assets/bower_components` directory: ``` ruby # Puts to ./vendor/assets/bower_components -js "backbone" -js "moment" +asset "backbone" +asset "moment" ``` But the default value can be overridden by `assets_path` method: ``` ruby assets_path "assets/my_javascripts" # Puts to ./vendor/assets/my_javascripts/bower_components -js "backbone" -js "moment" +asset "backbone" +asset "moment" ``` And finally, the `assets_path` method can be overridden by an option in a `group` call: ``` ruby assets_path "assets/javascript" # Puts files under ./vendor/assets/js/bower_components group :vendor, :assets_path => "assets/js" do - js "jquery" # Assummes it's latests - js "backbone", "1.2" + asset "jquery" # Assummes it's latests + asset "backbone", "1.2" end # Puts files under ./lib/assets/javascript/bower_components group :lib do - js "jquery" - js "backbone", "1.2" + asset "jquery" + asset "backbone", "1.2" end ``` NOTE: All the assets should be stored in `/assets` subdirectory so putting it under `./vendor/js` directory is unavailable -**Available commands with a Jsfile** +##Rake tasks -``` bash - rake bower:dsl:install #install js components - rake bower:dsl:install:force #install with force option - rake bower:dsl:update #update js components - rake bower:dsl:update:prune #update components and uninstall extraneous packages -``` +Once you are done with `bower.json` or `Bowerfile` you can run - - - - +* `rake bower:install` to install js components +* `rake bower:install:force` to install with force option +* `rake bower:update` to update js components +* `rake bower:update:prune` to update components and uninstall extraneous packages +* `rake bower:list` to list all packages