@fengfeng
2018-05-15T11:56:10.000000Z
字数 159
阅读 1005
npm
node
1、在package.json中scripts中增加一条命令
...
"test": "node test.js"
...
2、在test.js中
console.log(process.env.npm_config_foo);
3、执行
npm run test --foo=123
# 执行结果:123