0.1.29 • Published 9 years ago
npm-git v0.1.29
npm-git
- use private git(gitLab,bitbucket,etc) instead of npm
- use
npmgit publish
instead ofnpm publish
command line, compile & push to your git repo
Install
npm install npm-git -g
Why?
想实现私有的npm,通常是2种方案:
npmjs.com即将推出的:npm private modules & npm Enterprise
- npm private modules 可指定有权使用package的用户,也就是你可以
npm publish @mycorp/mypkg
,而mypkg源码可以放在任何git仓库。 - npm Enterprise 结合GitHub企业版,更完美了。
- npm private modules 可指定有权使用package的用户,也就是你可以
自建npm服务器,维护比较复杂,不推荐。
而以上2种方案,都还是需要自行管理源码:git仓库,即开发者至少需要2步才能完成1个package的发布:
git commit && git push
npm publish
除此之外,就是用npm本身对Git URLs的支持了(《关于commit-ish》):
dependencies: {
"mypkg": "git+https://mycopr/mypkg.git#commit-ish"
}
这样成本较低,但看不了依赖、被依赖、安装量等等
Usage
package.json:
{
"version": "0.1.8"
}
npmgit publish 'bug fix'
// -> git+git@mycorp:/mypkg.git#0.1.8 is published.
if git tag is package version,auto increment semver's patch to 0.1.9
npmgit publish
// -> git+git@mycorp:/mypkg.git#0.1.9 is published.
Todo
License
0.1.29
9 years ago
0.1.15
9 years ago
0.1.14
9 years ago
0.1.13
9 years ago
0.1.12
9 years ago
0.1.11
9 years ago
0.1.10
9 years ago
0.1.9
9 years ago
0.1.8
9 years ago
0.1.7
9 years ago
0.1.6
9 years ago
0.1.5
9 years ago
0.1.4
9 years ago
0.1.3
9 years ago
0.1.2
9 years ago
0.1.1
9 years ago
0.1.0
9 years ago
0.0.19
9 years ago
0.0.18
9 years ago
0.0.17
9 years ago
0.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
9 years ago
0.0.8
9 years ago
0.0.7
9 years ago
0.0.6
9 years ago
0.0.5
9 years ago
0.0.4
9 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago