private-npm
发布于 10 年前 作者 i5ting 3213 次浏览 最后一次编辑是 8 年前 来自 分享

npm private modules publish, share and install proprietary code easily Private modules are ordinary npm packages that only you, and people you select, can view, install, and publish. You publish them in your namespace or your team’s namespace, just by giving them a name in package.json:

{
  "name": "@myuser/mypackage"
}

You publish them with npm publish, just like any other package, and you install them by name:

npm install @myuser/mypackage

Once installed, use them by requiring them by name, just like any package:

var mypackage = require('@myuser/mypackage');

以后会用起来很方便哦

1 回复

但是

npm Private Modules are coming in early 2015.

等吧

回到顶部