yarn npm publish
When using -s,--scope, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the npmRegistries map, and the registry associated with the scope is configured via the npmScopes map).
When using --publish, the registry we’ll select will by default be the one used when publishing packages (publishConfig.registry or npmPublishRegistry if available, otherwise we’ll fallback to the regular npmRegistryServer).
Options
| Option | Description |
|---|---|
--access | The access for the published package (public or restricted) |
--tag | The tag on the registry that the package should be attached to |
--tolerate-republish | Warn and exit when republishing an already existing version of a package |
--otp | The OTP token to use with the command |
--provenance | Generate provenance for the package |
--dry-run | Show what would be published without actually publishing |
--json | Output the result in JSON format |