pnpm [-r] publish [<tarball|folder>] [--tag <tag>]
[--access <public|restricted>] [options]
在工作區中發佈套件時，來自工作區根目錄的 LICENSE 檔會與套件一起封裝 (除非套件自身具有授權)。
You may override some fields before publish, using the publishConfig field in
package.json. You also can use the
publishConfig.directory to customize the published subdirectory (usually using third party build tools).
When running this command recursively (
pnpm -r publish), pnpm will publish all the packages that have versions not yet published to the registry.
Publish all packages from the workspace.
以 JSON 格式顯示資料。
Publishes the package with the given tag. By default,
pnpm publish updates the
# inside the foo package directory
pnpm publish --tag next
# in a project where you want to use the next version of foo
pnpm add foo@next
Tells the registry whether the published package should be public or restricted.
Don't check if current branch is your publish branch, clean, and up-to-date with remote.
- Default: master and main
- Types: String
The primary branch of the repository which is used for publishing the latest changes.
Try to publish packages even if their current version is already found in the registry.
Save the list of published packages to
pnpm-publish-summary.json. Useful when some other tooling is used to report the list of published packages.
An example of a
Does everything a publish would do except actually publishing to the registry.
When publishing packages that require two-factor authentication, this option can specify a one-time password.
You can also set
publish-branch options in the
Life Cycle Scripts