diff --git a/provision/use-npm-repository.sh b/provision/use-npm-repository.sh index 41f67f0..6d7970b 100644 --- a/provision/use-npm-repository.sh +++ b/provision/use-npm-repository.sh @@ -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 diff --git a/provision/windows/use-npm-repository.ps1 b/provision/windows/use-npm-repository.ps1 index 3a6953c..3d2f845 100644 --- a/provision/windows/use-npm-repository.ps1 +++ b/provision/windows/use-npm-repository.ps1 @@ -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