yarn publish
将包发布到 npm 注册表。
包一旦发布,你就无法修改该特定版本,因此在发布之前请务必小心。
¥Once a package is published, you can never modify that specific version, so take care before publishing.
yarn publish
在当前目录中发布 package.json 定义的包。
¥Publishes the package defined by the package.json in the current directory.
yarn publish [tarball]
发布由 .tgz gzipped tarball 定义的包。
¥Publishes the package defined by a .tgz gzipped tarball.
yarn publish [folder]
发布指定文件夹中包含的包。<folder>/package.json 应指定包详细信息。
¥Publishes the package contained in the specified folder.
<folder>/package.json should specify the package details.
yarn publish --new-version <version>
使用 version 的值来跳过新版本的提示。
¥Skips the prompt for new version by using the value of version instead.
yarn publish --tag <tag>
向 yarn publish 提供标签可让你发布带有特定标签的包。例如,如果你执行 yarn publish --tag beta,并且你的软件包名为 blorp,那么其他人可以使用 yarn add blorp@beta 安装该软件包。
¥Providing a tag to yarn publish lets you publish packages with a specific tag.
For example, if you do a yarn publish --tag beta, and your package is named
blorp, then someone else can install that package with yarn add blorp@beta.
yarn publish --access <public|restricted>
--access 标志控制 npm 注册表是否将此包发布为公共包或受限包。
¥The --access flag controls whether the npm registry publishes this package as
a public package, or restricted.