Reputation: 5989
I have .npmrc with value for scope registry
@myScope:registry="myHtml"
I delete the .npmrc and I want to do it with npm config
I tried export npm_config_@myScope:registry=myHtml
and the I got not a valid identifier
I tried export VARNAME="npm_config_@myScope:registry" export VARNAME=myHtml" but it didn't update the environment parameter
Upvotes: 0
Views: 141
Reputation: 4394
You should use Node's Process object for that.
process.env.VARNAME = "myHTML"
This should expose your variable through you project. You can find more about it here: https://nodejs.org/api/process.html#process_process_env
Upvotes: 0