NoahSun / easy-nrm

An easy way to install packages by different npm registries using nrm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

easy-nrm

NPM version NPM

easy-nrm is an easy way to install packages by different npm registries using nrm.

install

Install with npm;

$ npm install -g easy-nrm 

Usage

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
  

Available props

The easy-nrm.config.jsaccepts 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

Related Projects

LICENSE

MIT

About

An easy way to install packages by different npm registries using nrm

License:MIT License


Languages

Language:JavaScript 100.0%