easy-nrm
is an easy way to install packages by different npm registries using nrm.
Install with npm;
$ npm install -g easy-nrm
At the root of project, create the fileeasy-nrm.config.json
.
{
"registries": {
"my-npm": ["pkg1"],
"my-npm -D": ["pkg2@0.1.0"],
"my-npm2": ["pkg3"],
"npm": ["pkg4"]
}
}
If you want to install some packages when you in dev mode, you should add -D
or --save-dev
at the end of register name.
{
"registries": {
"my-npm": ["pkg1"],
"my-npm --save-dev": ["pkg2", "pkg3"],
"my-npm-2": ["pkg4"],
"my-npm-2 -D": ["pkg5"]
}
}
If you want to install a specified version of a package, add @<version>
at the end of the package name.
{
"registries": {
"my-npm": ["pkg1@1.0.1", "pkg2"]
}
}
Usage: easy-nrm [options] [command]
Options:
-v, --version output the current version
-h, --help display help for command
Commands:
install|i install all the packages
help [command] display help for command
The easy-nrm.config.js
accepts these props:
Attribute | Type | Required | Default | Description |
---|---|---|---|---|
registries | Object | true | - | The packages in different registry |
default_registry | String | false | npm | Which registry when auto_install is true |
auto_install | Boolean | false | - | Install the dependencies of the project without which in config file |
MIT