1.npm直接安装GitHub/GitLab仓库代码语法npminstall示例命令:npmigit@github.com:mazeyqian/mazey.git-S#或者npmihttps://github.com/mazeyqian/mazey.git-S{"name":"test","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo\"Error:notestspecified\"&&exit1"},"author":"","license":"ISC","dependencies":{"mazey":"github:mazeyqian/mazey",}}#or{"name":"test","version":"1.0.0","description":"","main":"index.js","scripts":{"test":"echo\"错误:未指定测试\"&&exit1"},"author":"","license":"ISC","dependencies":{"mazey":"git+ssh://git@gitlab.mazey.net:mazeyqian/mazey.git"}}二、npmlink本地调试语法npmlink(包目录下)npmlink[<@scope>/][@]别名:npmlnsamplenpmpackage:mazey-sdk项目文件夹名称:mazey-project#进入本地npm文件cd~/mazey-sdknpmlink#进入项目文件cd~/mazey-projectnpmlinkmazey-sdk3.npmunlinkexamplenpmpackage:mazey-sdk项目文件夹名称:mazey-project#进入项目文件cd~/mazey-projectnpmunlink--no-savemazey-sdk#进入本地npm文件?cd~/mazey-sdknpmunlink版权声明本博客所有原创文章,作者保留版权。转载必须包含此声明,保持文章完整,并注明作者及出处超链接形式的文章原文地址:https://blog.mazey.net/2616.html(完)