Code Monkey home page Code Monkey logo

nodebrew's Introduction

nodebrew

Build Status

Node.js version manager.

Install

Install with curl.

$ curl -L git.io/nodebrew | perl - setup

Or, download and setup.

$ wget git.io/nodebrew
$ perl nodebrew setup

Add PATH setting your shell config file (.bashrc or .zshrc).

export PATH=$HOME/.nodebrew/current/bin:$PATH

Reload config.

$ source ~/.bashrc

Confirm.

$ nodebrew help

NODEBREW_ROOT (which indicates nodebrew's home directory) is configurable. If you want to install nodebrew manually, please configure such as follows.

export NODEBREW_ROOT=/path/to/.nodebrew

The default value is $HOME/.nodebrew.

Usage

nodebrew install <version>

Install Node.js.

$ nodebrew install v8.9.4

# or
$ nodebrew install latest # latest version
$ nodebrew install stable # stable version
$ nodebrew install v8.9   # v8.9 latest
$ nodebrew install 8.9.4  # without `v`

nodebrew compile <version>

If you want to compile from source, you can use compile command.

$ nodebrew compile v8.9.4

Pass configure options to Node.js.

$ nodebrew compile v8.9.4 --v8-options=--harmony

nodebrew use <version>

Switch a version to use.

$ nodebrew use v8.9.4
$ node -v
v8.9.4

# or
$ nodebrew use latest # latest version
$ nodebrew use stable # stable version
$ nodebrew use v8.9   # v8.9 latest
$ nodebrew use 8.9.4  # without `v`

nodebrew ls or nodebrew list

List all installed versions.

$ nodebrew ls
v8.9.9
v8.9.4

current: v8.9.4

nodebrew ls-remote

List remote versions.

$ nodebrew ls-remote
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6    
...

nodebrew ls-all

List installed and remote versions.

$ nodebrew ls-all
Remote:
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6    
...

Local:
v8.9.0
v8.9.4

current: v8.9.4

nodebrew alias

Set alias.

$ nodebrew alias default v8.9.4
default -> v8.9.4

$ nodebrew use default
use v8.9.4

$ nodebrew unalias default
remove default

nodebrew uninstall <version>

Uninstall Node.js.

$ nodebrew uninstall v8.9.4
v8.9.4 uninstalled

nodebrew selfupdate

Update nodebrew itself.

$ nodebrew selfupdate

nodebrew exec <version>

Execute other version temporary.

$ nodebrew exec v8.9.4 -- node app.js

All commands

$ nodebrew help                         Show this message
$ nodebrew install <version>            Download and install <version> (from binary)
$ nodebrew compile <version>            Download and install <version> (from source)
$ nodebrew install-binary <version>     Alias of `install` (For backword compatibility)
$ nodebrew uninstall <version>          Uninstall <version>
$ nodebrew use <version>                Use <version>
$ nodebrew list                         List installed versions
$ nodebrew ls                           Alias for `list`
$ nodebrew ls-remote                    List remote versions
$ nodebrew ls-all                       List remote and installed versions
$ nodebrew alias <key> <value>          Set alias
$ nodebrew unalias <key>                Remove alias
$ nodebrew clean <version> | all        Remove source file
$ nodebrew selfupdate                   Update nodebrew
$ nodebrew migrate-package <version>    Install global NPM packages contained in <version> to current version
$ nodebrew exec <version> -- <command>  Execute <command> using specified <version>

Development

Install dependencies for testing.

$ carton install

Run test.

$ carton exec -- prove -lvr

License

MIT © Kazuhito Hokamura

nodebrew's People

Contributors

hokaccha avatar hibariya avatar hideo55 avatar 3846masa avatar uberhacker avatar iwaim avatar famousgarkin avatar oinume avatar msfm avatar onopm avatar kysnm avatar zearin avatar yasuyk avatar yosuke-furukawa avatar hirose504 avatar nulltask avatar sanemat avatar hiyamamo avatar

Watchers

James Cloos avatar Hiroaki Kobayashi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.