扫码关注官方订阅号
RT,在package里面配置一下上传到github就行吗? 还是要提交到某个网站上
学习是最好的投资!
注册 http://npmjs.org/ 的账户,然后 npm publish 上去就可以了。
npm publish
可以参考 NPM 的文档:https://docs.npmjs.com/getting-started/publishing-npm-packages
不一定需要publish,有些私有的模块是不适合公开的
以某个git远程仓库(ssh)为例
npm install git+ssh://git@github.com:tommyZZM/veryimportant.git --save
针对某个commit或者tag或者分支可以加#
npm install git+ssh://git@github.com:tommyZZM/veryimportant.git#mybranch#mytag --save
参见:https://docs.npmjs.com/cli/install
你把楼上两位@tommyZZM 和 @FantasyShao 综合起来就ok啦。这是目前public和private的两种解决方案。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
注册 http://npmjs.org/ 的账户,然后
npm publish上去就可以了。可以参考 NPM 的文档:https://docs.npmjs.com/getting-started/publishing-npm-packages
不一定需要publish,有些私有的模块是不适合公开的
以某个git远程仓库(ssh)为例
针对某个commit或者tag或者分支可以加#
参见:
https://docs.npmjs.com/cli/install
你把楼上两位@tommyZZM 和 @FantasyShao 综合起来就ok啦。这是目前public和private的两种解决方案。