0.01
No commit activity in last 3 years
No release in over 3 years
ndenv integration for Capistrano
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

< 4, >= 3.1.0
~> 1.3
 Project Readme

Capistrano::ndenv

This gem provides idiomatic ndenv support for Capistrano 3.x (and 3.x only).

NOTE: This gem is a rip-off of https://github.com/capistrano/rbenv - give them the credit.

Why you might want it?

If you need to execute node or npm from capistrano and you prefer ndenv over nvm

Installation

Add this line to your application's Gemfile:

gem 'capistrano', '~> 3.1'
gem 'capistrano-ndenv', '~> 1.0'

And then execute:

$ bundle install

Usage

# Capfile
require 'capistrano/ndenv'


# config/deploy.rb
set :ndenv_type, :user # or :system, depends on your ndenv setup
set :ndenv_node, 'v0.10.31'
set :ndenv_prefix, "NDENV_ROOT=#{fetch(:ndenv_path)} NDENV_VERSION=#{fetch(:ndenv_node)} #{fetch(:ndenv_path)}/bin/ndenv exec"
set :ndenv_map_bins, %w{npm node} # default
set :ndenv_roles, :all # default value

If your ndenv is located in some custom path, you can use ndenv_custom_path to set it.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request