named parameter to npm run script
Just found out that this works:
"scripts":{
"say-hello" : "echo $npm_config_greeting && ls"
}
Edit:
Any environment variables that start with npm_config_ will be interpreted as a configuration parameter. For example, putting npm_config_foo=bar in your environment will set the foo configuration parameter to bar.
npm docs