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.
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/109531.html
摘要:本文介紹如何使用搭建私有倉庫,以及使用時(shí)如何映射到本地目錄,方便簡單對倉庫進(jìn)行各種操作。其次,創(chuàng)建目錄,并添加的配置文件。當(dāng)需要把某個(gè)項(xiàng)目發(fā)布到私有庫時(shí),直接。使用包名,即可安裝私有包了。本文介紹如何使用 verdaccio 搭建私有npm倉庫,以及使用 docker 時(shí)如何映射到本地目錄,方便簡單對倉庫進(jìn)行各種操作。系統(tǒng)環(huán)境是 Linux。 verdaccio verdacci...
摘要:前端開發(fā)過程中,少不了自己封裝一些通用的包,但又不想放在公共的平臺,所以搭建一個(gè)私有的倉庫是很有必要的。在這里簡單介紹如何使用在環(huán)境下的配置。輕量級私有代理注冊表。加上,那就真的無敵方便了,搭建一個(gè)私有倉庫輕輕松松幾分鐘搞定。前端開發(fā)過程中,少不了自己封裝一些通用的包,但又不想放在公共的平臺,所以搭建一個(gè)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...
摘要:原因我搭私庫的原因很簡單,目前正在開發(fā)一個(gè)組件庫,提供給公司內(nèi)部使用,我不想去注冊,也不想等待的審核,只想要有個(gè)倉庫快速測試發(fā)布自己的包。我一般會通過啟動,原因很簡單,關(guān)閉窗口后,服務(wù)不會停掉,并且能很好的管理我們啟動的服務(wù)。 原因 我搭私庫的原因很簡單,目前正在開發(fā)一個(gè)組件庫,提供給公司內(nèi)部使用,我不想去注冊npm,也不想等待npm的審核,只想要有個(gè)倉庫快速測試發(fā)布自己的npm包。 ...
閱讀 777·2023-04-26 03:04
閱讀 2860·2021-11-15 18:10
閱讀 1188·2021-09-03 10:28
閱讀 1126·2019-08-30 15:53
閱讀 877·2019-08-30 12:45
閱讀 1951·2019-08-30 11:03
閱讀 2862·2019-08-29 14:01
閱讀 2926·2019-08-28 18:24