Publish to npm
scottgonzalez opened this issue · 3 comments
scottgonzalez commented
Publish to npm
scottgonzalez commented
Pre-releases apparently should be tagged, e.g., npm publish --tag beta
.
jzaefferer commented
I couldn't find any information on tagging pre-releases. The docs for npm publish
don't mention the --tag
option. The docs for npm-config mention it, but only in relation to installing packages:
Default: latest
Type: String
If you ask npm to install a package and don't tell it a specific version, then it will install the specified tag.
Also the tag that is added to the package@version specified by the npm tag command, if no explicit tag is given.
There's also npm-tag
, but that doesn't mention publishing either.
Even if there's some point in using this, how would the release script know what tag to use?
scottgonzalez commented
I've never tagged a release, I think I saw @timmywil mention it. Assuming there are standard tags like alpha, beta, rc, we can parse them from the specified version (pre-releases always have explicitly specified versions).