Adds your bower directory to your Sprockets asset path.
Add this line to your application's Gemfile:
gem 'sprockets-bowerrc'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sprockets-bowerrc
config/initializers/assets.rb
Rails.application.config.assets.configure do |env|
env.append_bowerrc
end
This will append the bower directory determined by your bowerrc file to your asset path. You can instead use env.prepend_bowerrc
to add it to the front.
require 'sprockets'
require 'sprockets-bower'
map '/assets' do
environment = Sprockets::Environment.new
environment.append_bowerrc
run environment
end
This will append the bower directory determined by your bowerrc file to your asset path. You can instead use environment.prepend_bowerrc
to add it to the front.
- Fork it ( https://github.com/casao/sprockets-bowerrc/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request