Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lambdabaa/envy

Isolated nodejs/npm "virtual" environment and task runner
https://github.com/lambdabaa/envy

Last synced: 7 days ago
JSON representation

Isolated nodejs/npm "virtual" environment and task runner

Awesome Lists containing this project

README

        

envy
====

[![Build
Status](https://travis-ci.org/lambdabaa/envy.png?branch=master)](https://travis-ci.org/gaye/envy)

Inspired by
[lightsofapollo/exhibition](https://github.com/lightsofapollo/exhibition).

### Installation

```bash
git clone https://github.com/gaye/envy.git
// set PATH=/path/to/envy:$PATH
```

#### Slightly Fancier (if you already have some npm)

```bash
npm install -g jsenvy@latest
```

### Usage

```bash
# envy will download default versions of node and npm into a sandbox.
$ envy node --version
v2.2.1

$ envy npm --version
2.11.2

# Or you can configure the versions with environment variables.
$ NODEJS_VERSION=v1.8.1 envy node --version
v1.8.1

$ NPM_VERSION=1.4.28 envy npm --version
1.4.28

# npm -g will install stuff into the sandbox. No sudo required!
$ envy npm install -g mocha
/home/gareth/Documents/envy/npm/2.11.2/bin/bin/mocha -> /home/gareth/Documents/envy/npm/2.11.2/bin/lib/node_modules/mocha/bin/mocha
/home/gareth/Documents/envy/npm/2.11.2/bin/bin/_mocha -> /home/gareth/Documents/envy/npm/2.11.2/bin/lib/node_modules/mocha/bin/_mocha
[email protected] /home/gareth/Documents/envy/npm/2.11.2/bin/lib/node_modules/mocha
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected])

# Magic!
$ envy mocha --help
```

### Profile

You can also specify project-specific `NODEJS_VERSION` and `NPM_VERSION`
by adding an `.envyrc` file to your project root like this

```bash
NODEJS_VERSION=v0.12.4
NPM_VERSION=2.11.2
```