Linux command
bun-publish 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Publish a package
bun publish
Publish with a specific tag
bun publish --tag [beta]
Publish with public access
bun publish --access public
Dry run
bun publish --dry-run
说明
bun publish publishes the current package to the npm registry. It reads package configuration from package.json and uploads the package tarball. Before publishing, ensure you're logged in with bun login or have appropriate credentials configured.
参数
- --tag _tag_
- Publish with a specific dist-tag (default: latest).
- --access _public|restricted_
- Set access level for scoped packages.
- --dry-run
- Show what would be published without actually publishing.
- --otp _code_
- One-time password for 2FA.
FAQ
What is the bun-publish command used for?
bun publish publishes the current package to the npm registry. It reads package configuration from package.json and uploads the package tarball. Before publishing, ensure you're logged in with bun login or have appropriate credentials configured.
How do I run a basic bun-publish example?
Run `bun publish` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --tag _tag_ do in bun-publish?
Publish with a specific dist-tag (default: latest).