0.1.29 • Published 10 years ago

npm-git v0.1.29

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

npm-git

NPM Version NPM Downloads Build Status

  • use private git(gitLab,bitbucket,etc) instead of npm
  • use npmgit publish instead of npm publish command line, compile & push to your git repo

Install

npm install npm-git -g

Why?

想实现私有的npm,通常是2种方案:

  1. npmjs.com即将推出的:npm private modules & npm Enterprise

    • npm private modules 可指定有权使用package的用户,也就是你可以npm publish @mycorp/mypkg,而mypkg源码可以放在任何git仓库。
    • npm Enterprise 结合GitHub企业版,更完美了。
  2. 自建npm服务器,维护比较复杂,不推荐。

而以上2种方案,都还是需要自行管理源码:git仓库,即开发者至少需要2步才能完成1个package的发布:

  1. git commit && git push
  2. 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

MIT

0.1.29

10 years ago

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.19

10 years ago

0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago