赞
踩
npm install <git remote url>
命令:
npm i git@github.com:mazeyqian/mazey.git -S
# 或
npm i https://github.com/mazeyqian/mazey.git -S
{ "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "mazey": "github:mazeyqian/mazey", } } # 或 { "name": "test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "mazey": "git+ssh://git@gitlab.mazey.net:mazeyqian/mazey.git" } }
npm link (in package dir)
npm link [<@scope>/]<pkg>[@<version>]
alias: npm ln
npm 包:mazey-sdk
项目文件夹名:mazey-project
# 进入本地 npm 文件
cd ~/mazey-sdk
npm link
# 进入项目文件
cd ~/mazey-project
npm link mazey-sdk
npm 包:mazey-sdk
项目文件夹名:mazey-project
# 进入项目文件
cd ~/mazey-project
npm unlink --no-save mazey-sdk
# 进入本地 npm 文件?
cd ~/mazey-sdk
npm unlink
版权声明
本博客所有的原创文章,作者皆保留版权。转载必须包含本声明,保持本文完整,并以超链接形式注明作者后除和本文原始地址:https://blog.mazey.net/2616.html
(完)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。