@inventage/envsubst
v0.17.0
Published
Environment variables substitution for Node
Downloads
1,897
Readme
envsubst
Bash-like environment variables substitution
Example
Let's say you have a file temp
with the following content:
${BAR}
${FOO:-foo}
When you run BAR=baz npx --ignore-existing @inventage/envsubst temp
, you will end up with the following content in temp
:
baz
foo
and the following output:
Made 2 replacements:
┌──────┬─────────────┬───────┐
│ File │ Variable │ Value │
├──────┼─────────────┼───────┤
│ temp │ ${BAR} │ baz │
├──────┼─────────────┼───────┤
│ temp │ ${FOO:-foo} │ foo │
└──────┴─────────────┴───────┘