https://github.com/floatdrop/chnpm
npm configuration switcher
https://github.com/floatdrop/chnpm
Last synced: 2 months ago
JSON representation
npm configuration switcher
- Host: GitHub
- URL: https://github.com/floatdrop/chnpm
- Owner: floatdrop
- License: mit
- Created: 2014-03-06T14:48:30.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-07-18T09:13:12.000Z (almost 10 years ago)
- Last Synced: 2025-03-14T01:31:40.975Z (about 1 year ago)
- Language: JavaScript
- Size: 291 KB
- Stars: 44
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chnpm [](https://travis-ci.org/floatdrop/chnpm)
> Manage your npm files with ease
## Install
```
$ npm install --save chnpm
```
## Usage
```js
var chnpm = require('chnpm');
chnpm.current();
//=> 'http://registry.npmjs.org'
```
## CLI
```
$ npm install --global chnpm
```
```
Manage your npm files with ease
Usage
$ chnpm [options] [name]
Examples
$ chnpm
Currently on http://registry.npmjs.org
$ chnpm --save npmjs
Config saved to ~/.npmjs.npmrc
$ npm config set registry http://registry.local.org
$ chnpm --save local
Config saved to ~/.local.npmrc
$ chnpm local
Switched to http://registry.local.org
Options
--save NAME Save current configuration to ~/.NAME.npmrc
```
## API
### chnpm.current()
Returns current registry url.
### chnpm.save(name)
Saves current config file as `~/.${name}.npmrc`.
### chnpm.load(name)
Saves `~/.${name}.npmrc` as current config file.
## License
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)