Total Pageviews

Saturday, 5 August 2017

cnpm: npm client for China mirror of npm

cnpm: npm client for




$ npm install cnpm -g
If you're in China, maybe you should install it from our China mirror:
$ npm install cnpm -g --registry=


Support all commands just like npm.

Sync packages from npm

$ cnpm sync [moduleName]

Open package document or git web url

$ cnpm doc [name]
$ cnpm doc -g [name] # open git web url directly

Build your own private registry npm cli

$ npm install cnpm -g

# then alias it
$ alias mynpm='cnpm --registry= \
  --registryweb= \

Install with orginal npm cli

cnpm using npminstall by default. If you don't like symlink mode for node_modules, you can change the installer to orginal npm. But you will lose the fatest install speed.
$ cnpm i --by=npm react-native

No comments:

Post a Comment

Note: only a member of this blog may post a comment.