Project

bowdler

0.0
No commit activity in last 3 years
No release in over 3 years
Create a Bowerfile alongside your Gemfile and just bundle.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
 Project Readme

bowdler

Build Status Dependency Status Code Climate Coverage Status Gem Version

bower as you bundle, no bs.

Requirements

  • node
  • bower (>= 0.10.0) installed with npm
  • ruby >= 1.9

How

Install:

gem install 'bowdler'

Add this line to your application's Gemfile:

# Gemfile
source 'https://rubygems.org'

require 'bowdler'

Create a Bowerfile alongside your Gemfile:

# Bowerfile

asset 'backbone', '0.9'
# ...

And you're done. Do a bundle install:

Using rake (10.1.0)
Using bundler (1.3.5)
bower backbone#0.9              cached git://github.com/jashkenas/backbone.git#0.9.10
bower backbone#0.9            validate 0.9.10 against git://github.com/jashkenas/backbone.git#0.9
bower backbone#0.9             install backbone#0.9.10

backbone#0.9.10 bower_components/backbone
bower check-new     Checking for new versions of the project dependencies..
dsl-generated dependencies /home/lite/work/bundler-bower/spec/dummy/vendor/assets
├── backbone#0.9.10 (latest is 1.1.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

Execute bundle or bundle install, bowdler will execute bower install. Executing bundle update, bowdler will execute bower update.
After that, check for your bower assets on vendor. You can change the default directory with the assets_path method, like this:

# Bowerfile
assets_path 'source/vendor' # usefull along with Middleman gem

asset 'backbone', '0.9'
# ...

Ommit the version and stay fresh with the latest releases.

# Bowerfile
assets_path 'source/vendor'

asset 'jquery'
asset 'backbone'
# ...

Credits

Initially, this was supposed to be a bundler-bower fork, but it was so complex to simplify it (like when using it with Middleman), that I've ended up stripping out most of the code, modding some parts and packing everything on a separate gem.

There's also some pieces of code taken from bower-rails.