Bash-like environment variables substitution
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 │
└──────┴─────────────┴───────┘