Table of contents
关于公共包
Table of contents
As an npm user or organization member, you can create and publish public packages that anyone can download and use in their own projects.
- Unscoped public packages exist in the global public registry namespace and can be referenced in a
package.json
file with the package name alone:package-name
. - Scoped public packages belong to a user or organization and must be preceded by the user or organization name when included as a dependency in a
package.json
file:@username/package-name
@org-name/package-name
Next steps
- "Creating and publishing scoped public packages"
- "Creating and publishing unscoped public packages"
- "Using npm packages in your projects"
声明:npm 及相关 logo 的版权归 npmjs.com 所有。本站点仅用于 npm 中文文档,与 npmjs.com 没有任何关系。由于译者水平有限,且避免产生误解,条款和政策内容不进行翻译,关于这部分,请移步官网查看最新内容。