-
-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
When putting something like process.env.hello = 'hi'
in the package-scripts.js
file, you get hello=hi
in the spawned environment.
To me, that is a very nice feature, because I can provide helper vars to scripts, while the commands stay somewhat readable, e.g.
process.env.defDebug = '*,-babel,-something,-other'
if (!process.env.NODE_ENV) process.env.NODE_ENV = 'development'
module.exports = {scripts: {default: `\${DEBUG:-$defDebug} node script.js`}}
This will provide the default settings to DEBUG
if it's not defined, and enforce NODE_ENV=development
unless specified.
I'd like this feature to remain always; I can add it to the documentation if you like, but I have no idea how to write a test for it. I had a look at the tests but couldn't figure it out quickly.
Metadata
Metadata
Assignees
Labels
No labels