Server
server:all developers can have access to it, the server environment is windows.
We need to use the npm command to install verdaccio, so we have to have a node environment.
step1: install the node environment
Download node
install node
Verify that the installation was successful
Open cmd and input "node -v"
step2:Installation start verdaccio
Install verdaccio
Open cmd and input "npm install -g verdaccio"
Start verdaccio
input "verdaccio"
After the startup is successful, open http://localhost:4873/ and see the interface is successful.
Configuration file
Find the configuration file of verdaccio, You can modify the configuration by referring to https://verdaccio.org/docs/en...
verdaccio runs by default in the port 4873,we can change the listen address and port.
After change the configurations,then restart the verdaccio, open http://10.137.118.26:3001/#/ and can see the interface like below
The private repository has been set up.
Client configurationWe need to use our client to configure our registry to use our private repository.The client is the developer"s development computer.You need to install the node environment.
npm release package
you need to register or login your account. If we don"t have an account yet, we can create it by entering the command npm adduser --registry http://10.137.118.26:3001 and then entering the username in turn. If you already have an account, you can log in by entering the command npm login --registry http://10.137.118.26:3001 and then entering the username and password. Then enter the code directory we need to upload, execute the command to publish.
Just got a project name called "example", there is nothing in it, npm init creates a new package.json.The package.json code is as follows:
register account like below:
when we register a account,it will auto login.
Then we can use the npm publish command to publish the package.
And,we can see the package published success.
npm download package
Just open a project called "test", Use the command npm install "@sfc/example" to download the npm package we just posted to private.
After the download is complete, we can see the example file in the node_modules folder of the project.
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/109531.html
摘要:本文介紹如何使用搭建私有倉庫,以及使用時如何映射到本地目錄,方便簡單對倉庫進行各種操作。其次,創建目錄,并添加的配置文件。當需要把某個項目發布到私有庫時,直接。使用包名,即可安裝私有包了。本文介紹如何使用 verdaccio 搭建私有npm倉庫,以及使用 docker 時如何映射到本地目錄,方便簡單對倉庫進行各種操作。系統環境是 Linux。 verdaccio verdacci...
摘要:前端開發過程中,少不了自己封裝一些通用的包,但又不想放在公共的平臺,所以搭建一個私有的倉庫是很有必要的。在這里簡單介紹如何使用在環境下的配置。輕量級私有代理注冊表。加上,那就真的無敵方便了,搭建一個私有倉庫輕輕松松幾分鐘搞定。前端開發過程中,少不了自己封裝一些通用的包,但又不想放在公共的平臺,所以搭建一個npm私有的倉庫是很有必要的。 在這里簡單介紹如何使用 verdoccio 在docke...
摘要: Our server environment is linux Ubuntu, this article is mainly about how to build our NPM private library in linux Ubuntu environment. Install Nodejs We need to use the npm command to install v...
摘要:原因我搭私庫的原因很簡單,目前正在開發一個組件庫,提供給公司內部使用,我不想去注冊,也不想等待的審核,只想要有個倉庫快速測試發布自己的包。我一般會通過啟動,原因很簡單,關閉窗口后,服務不會停掉,并且能很好的管理我們啟動的服務。 原因 我搭私庫的原因很簡單,目前正在開發一個組件庫,提供給公司內部使用,我不想去注冊npm,也不想等待npm的審核,只想要有個倉庫快速測試發布自己的npm包。 ...
閱讀 797·2023-04-26 03:04
閱讀 2873·2021-11-15 18:10
閱讀 1199·2021-09-03 10:28
閱讀 1137·2019-08-30 15:53
閱讀 896·2019-08-30 12:45
閱讀 1965·2019-08-30 11:03
閱讀 2870·2019-08-29 14:01
閱讀 2935·2019-08-28 18:24