better-npm-run
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -13,3 +13,3 @@ require('dotenv').config({silent: true}); | ||
var env = objectAssign(process.env, script.env); | ||
var env = objectAssign({}, script.env, process.env); | ||
@@ -16,0 +16,0 @@ var sh = 'sh', shFlag = '-c'; |
{ | ||
"name": "better-npm-run", | ||
"description": "Better NPM scripts runner", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"license": "MIT", | ||
@@ -22,6 +22,7 @@ "author": "Benjamin Orozco <benoror@gmail.com>", | ||
"test:env": "node index.js test:env", | ||
"test:env-extend": "TEST_ENV2=envvar node index.js test:env-extend", | ||
"test:params": "node index.js test:params --test", | ||
"test:command:object": "node index.js test:command:object", | ||
"test:command:string": "node index.js test:command:string", | ||
"test": "npm run test:env && npm run test:params && npm run test:command:object && npm run test:command:string" | ||
"test": "npm run test:env && npm run test:env-extend && npm run test:params && npm run test:command:object && npm run test:command:string" | ||
}, | ||
@@ -45,4 +46,11 @@ "dependencies": { | ||
} | ||
}, | ||
"test:env-extend": { | ||
"command": "node ./test/env-extend.js", | ||
"env": { | ||
"TEST_ENV": "overridden", | ||
"FOO": "bar" | ||
} | ||
} | ||
} | ||
} |
@@ -80,2 +80,9 @@ [![NPM](https://nodei.co/npm/better-npm-run.png)](https://npmjs.org/package/better-npm-run) | ||
Environment variables will be merged in the following order: | ||
* `package.json` options | ||
* `.env` file content | ||
* parent `process.env` values | ||
Whoever comes last, will set the actual value. | ||
# Shell scripts | ||
@@ -82,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
8661
11
73
130