tk-basic-test-package-github
v2.1.0
Published
Different ways to authenticate with npm and publish a package
Downloads
15
Readme
tk-basic-test-package-github
Different ways to authenticate with npm and publish a package
I have deleted all the tokens. So It won't work.
- Login to npm and publish
npm login
npm publish
- Create a token and use it to publish Public Package Publish Token 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
.npmrc //registry.npmjs.org/:_authToken=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
- Using environment variable in .npmrc and passing environment variable in command line
.npmrc
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
export NPM_TOKEN=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 && npm publish
Having the command in the script is not working?
DON'T KNOW
Without && between export token and npm publish command delete the token in the github repo
export NPM_TOKEN=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 && npm publish
"prepublishOnly": "npm run ci", // update it