diff --git a/README.md b/README.md index f88ad47..59369e8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ nrm -- NPM registry manager [![NPM version][npm-image]][npm-url] `nrm` can help you easy and fast switch between different npm registries, -now include: `npm`, `cnpm`, `taobao`, `nj(nodejitsu)`. +now include: `npm`, `yarn`, `tencent`,`cnpm`, `taobao`, `npmMirror`. ## How to configure yarn to use private registry ? just add .yarnrc in your project’s directory and write there: @@ -44,38 +44,26 @@ $ nrm use cnpm //switch registry to cnpm ``` Usage: nrm [options] [command] - Commands: - - ls List all the registries - current Show current registry name - use Change registry to registry - add [home] Add one custom registry - login [value] Set authorize information for a registry with a base64 encoded string or username and pasword - -a --always-auth Set is always auth - -u --username Your user name for this registry - -p --password Your password for this registry - -e --email Your email for this registry - set-hosted-repo Set hosted npm repository for a custom registry to publish packages - set-scope Associating a scope with a registry - del-scope Remove a scope - set Set custom registry attribute - -a --attr Set custorm registry attribute - -v --value Set custorm registry value - del Delete one custom registry - rename Set custom registry name - home [browser] Open the homepage of registry with optional browser - publish [|] Publish package to current registry if current registry is a custom registry. The field 'repository' of current custom registry is required running this command. If you're not using custom registry, this command will run npm publish directly - -t --tag [tag] Add tag - -a --access Set access - -o --otp [otpcode] Set otpcode - -dr --dry-run Set is dry run - test [registry] Show the response time for one or all registries - help Print this help - - Options: - - -h --help output usage information - -V --version output the version number +Options: + -V, --version output the version number + -h, --help display help for command + +Commands: + ls List all the registries + current [options] Show current registry name or URL + use Change current registry + add [home] Add custom registry + login [options] [base64] Set authorize information for a custom registry with a base64 encoded string or username + and password + set-hosted-repo Set hosted npm repository for a custom registry to publish package + set-scope Associating a scope with a registry + del-scope Remove a scope + set [options] Set a custom registry attribute + rename Change custom registry name + del Delete custom registry + home [browser] Open the homepage of registry with optional browser + test [registry] Show response time for specific or all registries + help [command] display help for command ``` ## Registries @@ -83,7 +71,6 @@ Usage: nrm [options] [command] * [npm](https://www.npmjs.org) * [yarn](https://yarnpkg.com) * [cnpm](http://cnpmjs.org) -* [nodejitsu](https://www.nodejitsu.com) * [taobao](https://npmmirror.com) ## Related Projects diff --git a/actions.js b/actions.js index ab454ef..e47e0bb 100644 --- a/actions.js +++ b/actions.js @@ -113,7 +113,7 @@ async function onLogin(name, base64, { alwaysAuth, username, password, email }) } else if (username && password) { registry[AUTH] = Buffer.from(`${username}:${password}`).toString('base64'); } else { - return exit('Authorization information in base64 format or username & password is required'); + return exit('Authorization information in base64 format or username & password is required.'); } if (alwaysAuth) { @@ -155,7 +155,7 @@ async function onSetRepository(name, repo) { const npmrc = await readFile(NPMRC); Object.assign(npmrc, { [REPOSITORY]: repo }); await writeFile(NPMRC, npmrc); - printSuccess(`Set repository attribute of npmrc successfully`); + printSuccess(`Set repository attribute of npmrc successfully.`); } } diff --git a/package.json b/package.json index f9d8c55..55eec99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nrm", - "version": "1.2.5", + "version": "1.2.6", "description": "NPM registry manager can help you easy and fast switch between different npm registries, now include: cnpm, taobao, nj(nodejitsu), edunpm", "bin": "./cli.js", "repository": {