Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix version and doc #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 21 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -44,46 +44,33 @@ $ nrm use cnpm //switch registry to cnpm
```
Usage: nrm [options] [command]

Commands:

ls List all the registries
current Show current registry name
use <registry> Change registry to registry
add <registry> <url> [home] Add one custom registry
login <registry> [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 <username> Your user name for this registry
-p --password <password> Your password for this registry
-e --email <email> Your email for this registry
set-hosted-repo <registry> <value> Set hosted npm repository for a custom registry to publish packages
set-scope <scopeName> <value> Associating a scope with a registry
del-scope <scopeName> Remove a scope
set <registryName> Set custom registry attribute
-a --attr <attr> Set custorm registry attribute
-v --value <value> Set custorm registry value
del <registry> Delete one custom registry
rename <registryName> <newName> Set custom registry name
home <registry> [browser] Open the homepage of registry with optional browser
publish [<tarball>|<folder>] 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 <public|restricted> 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 <name> Change current registry
add <name> <url> [home] Add custom registry
login [options] <name> [base64] Set authorize information for a custom registry with a base64 encoded string or username
and password
set-hosted-repo <name> <repo> Set hosted npm repository for a custom registry to publish package
set-scope <scopeName> <url> Associating a scope with a registry
del-scope <scopeName> Remove a scope
set [options] <name> Set a custom registry attribute
rename <name> <newName> Change custom registry name
del <name> Delete custom registry
home <name> [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

* [npm](https://www.npmjs.org)
* [yarn](https://yarnpkg.com)
* [cnpm](http://cnpmjs.org)
* [nodejitsu](https://www.nodejitsu.com)
* [taobao](https://npmmirror.com)

## Related Projects
Expand Down
4 changes: 2 additions & 2 deletions actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down