Capistrano::NodeJS
Capistrano plugin to install NPM and Bower dependencies and run Grunt tasks for deployment.
Installation
Add this line to your application's Gemfile:
gem 'Capistrano-NodeJS'
And then execute:
$ bundle
Or install it yourself as:
$ gem install Capistrano-NodeJS
Usage
# Capfile
require 'capistrano/nodejs'
# config/deploy.rb
# Only required if you don't want to download dependencies on every deploy, rather than updating the previous deploy.
set :linked_dirs, %w(node_modules app/bower_components)
set :npm_target, -> { release_path.join('npm_dir') } # Defaults to not set.
set :bower_target, -> { release_path.join('bower_dir') } # Defaults to not set.
set :grunt_target, -> { release_path.join('grunt_dir') } # Defaults to not set.
set :npm_role, :all # Defaults to :all
set :bower_role, :all # Defaults to :all
set :grunt_role, :all # Defaults to :all
set :npm_args, %w(--production --silent) # Defaults to '--production' & '--silent'.
set :bower_args, %w(--silent) # Defaults to '--silent'.
set :grunt_args, %w() # Defaults to none.
Contributing
- Fork it ( https://github.com/Ranndom/Capistrano-NodeJS/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