Foreword
When you're growing R & D team, or you can not stand when you build ultra-slow node can be considered read on, give us a recommendation based Verdaccio relatively complete solution.
For environmental reasons, we go directly to the npmjs.org
download do not consider, can npm config set registry=https://registry.npm.taobao.org
relieve part, but if some of your own company customized package npm in the company how to share it, this time you need a npm the PW.
What is Verdaccio
Verdaccio is a simple zero-configuration lightweight node.js private npm agency warehouse.
What do verdaccion
1. Cache npmjs.org warehouse
npm install slow as we all know, you can use it to reduce the delay (probably "slow" npmjs.org each package / version once connected only) and provide limited failover (if using npmjs.org hung up, we still can be obtained by a corresponding packet buffer)
2. private warehouse
If you do not want to send all the code for public use in the company npm package system, use a proprietary software package, as easy as using a common software packages.
3. Linking multiple warehouse
If you use multiple npm warehouse in the organization, and the need to retrieve packages from multiple sources in a project, you can use the uplink function Verdaccio will link up multiple warehouses and get from one end.
4. package covering public
If you are using a modified version of a third-party package (for example, you found a bug, but has not yet accepted defenders Request), you can use the same name published in the local version. The details look here .
The end to end testing
Facts have proved that, Verdaccio warehouse is a lightweight, can be started within a few seconds, are fast enough for any CI is. Many open source projects use verdaccio end to end testing.
Note : 3,4,5 feature requires you to explore.
installation
Note : Verdaccio supports a variety of installation, the package even includes charts
Pre-conditions
1. Node version
- [email protected] Node v6.12 is the lowest version.
- [email protected] or [email protected] Node 8.x (LTS "Carbon") is the lowest version.
2. npm >=4.x or yarn
Official strongly recommend using the latest package management node client> [email protected] | [email protected] | [email protected]
3. Web interface supports Chrome, Firefox, Edge, and IE11 browsers.
Docker-compose deployed
We can refer directly to the archived version of the portal
It is time to abandon cnpm, I hope you can enjoy verdaccio.
More
-
Please refer verdaccio official documents
- Speed node build speed, it is recommended to enable multi-stage build