mention that we can also use the NPM_TOKEN environment variable when publishing package

This commit is contained in:
Rui Lopes 2019-05-21 22:10:03 +01:00
parent 595ce6a0db
commit f31970d059
2 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,8 @@ npm_auth_token=$(NODE_PATH=$PWD/node_modules node --use-openssl-ca /vagrant/prov
npm set //$nexus_domain/repository/npm-hosted/:_authToken $npm_auth_token
# publish.
# NB instead of using the token from the npm configuration you can
# export the NPM_TOKEN environment variable.
npm publish --registry=$NPM_REGISTRY
popd

View File

@ -90,6 +90,8 @@ $npmAuthToken = node --use-openssl-ca /vagrant/provision/npm-login.js 2>$null
npm set "//$nexusDomain/repository/npm-hosted/:_authToken" $npmAuthToken
# publish.
# NB instead of using the token from the npm configuration you can
# set the NPM_TOKEN environment variable.
npm publish --registry=$env:NPM_REGISTRY
popd