A config object can be used to set configuration parameters
used in package scripts that persist across upgrades.
For instance, if a package had the following:
{
"config" : {
"port" : "8080"
}
}
and then had a start command that then referenced the
npm_package_config_port environment variable,
then the user could override that by doing npm config set foo:port 8001.
Generated using TypeDoc
A
configobject can be used to set configuration parameters used in package scripts that persist across upgrades. For instance, if a package had the following:{ "config" : { "port" : "8080" } }and then had a
startcommand that then referenced thenpm_package_config_portenvironment variable, then the user could override that by doing npm config setfoo:port 8001.https://docs.npmjs.com/files/package.json#config
https://yarnpkg.com/en/docs/package-json#toc-config