assets_rails
Requirements
Compatible
Install
in Gemfile
gem 'assets_rails'
Usage
add config/application.rb
config.assets.paths << Rails.root.join('node_modules') # if use npm
config.assets.paths << Rails.root.join('bower_components') # if use bower
config.assets.components = %w(npm bower) # if use npm and bower
example for npm
npm init -y
npm install bootstrap --save
example for bower
bower init -y
bower install bootstrap --save
Capistrano 3 Configuration
namespace :assets_rails do
desc 'Install assets and resolve assets'
task :install do
on roles(:web) do
within release_path do
execute :rake, 'assets_rails:install assets_rails:resolve RAILS_ENV=production'
end
end
end
end
before 'deploy:compile_assets', 'assets_rails:install'
Contributing
- Fork it ( https://github.com/8398a7/assets_rails/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