Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/troy0820/n-api
node.js api for running "n" commands
https://github.com/troy0820/n-api
Last synced: about 1 month ago
JSON representation
node.js api for running "n" commands
- Host: GitHub
- URL: https://github.com/troy0820/n-api
- Owner: troy0820
- Created: 2015-04-29T07:01:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2014-12-10T00:08:38.000Z (almost 10 years ago)
- Last Synced: 2024-04-23T02:21:13.194Z (7 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.org/package/n-api
- Size: 492 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
n-api
=====[![NPM version][npm-image]][npm-url]
[![Build status][travis-image]][travis-url]
[![Dependency Status][daviddm-image]][daviddm-url]node.js api for n (https://www.npmjs.org/package/n). Minor version is in step with `n`.
## Usage
### `n()`
Switch to the specified node version. Download and Install if not present on
system.```js
var n = require('n-api');n('latest');
// do some stuff
```### `n.prev()`
Switch to previously active version
### `n.ls()`
List availble versions;
```js
var list = n.ls(); // [ '0.8.6', '0.8.7', ... '0.11.13' ]
```### `n.use(, )`
Run `cmd` with the specified `version` of node.
```js
n.use('0.11.13', 'app.js');
```### `n.bin()`
Return the location of the node binary for the specified `version`, or `null`
if that version is not installed.o
### License[MIT License](http://www.opensource.org/licenses/mit-license.php)
### Author
[Travis Webb](https://github.com/tjwebb) ([[email protected]](mailto:[email protected]))
[npm-image]: https://img.shields.io/npm/v/n-api.svg?style=flat
[npm-url]: https://npmjs.org/package/n-api
[travis-image]: https://img.shields.io/travis/tjwebb/n-api.svg?style=flat
[travis-url]: https://travis-ci.org/tjwebb/n-api
[daviddm-image]: http://img.shields.io/david/tjwebb/n-api.svg?style=flat
[daviddm-url]: https://david-dm.org/tjwebb/n-api