Is it posible to reuse a variable of the config section?
...
"config": {
"source": "Hello",
"root": "$npm_package_config_source World"
}
...
I can do this in the scripts section but I don't know if it is possible in the config section or there is one approach to have incremental variables in order to avoid copy & paste...
configobject in the way that you are describing. You can only reference them from inside thescriptssection of package.json. So if yourconfigobject is defined something like this:"config": {"source": "Hello", "root": "World"}and in yourscriptssection you have something like this:"scripts": { "say-hello": "echo $npm_package_config_source $npm_package_config_root"}- then runningnpm run say-hellowill successfully log Hello World to your console.