npm

@inventage/envsubst

0.17.0 • Public • Published

envsubst

Bash-like environment variables substitution

 Main Workflow  npm version

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   │
└──────┴─────────────┴───────┘

Package Sidebar

Install

npm i @inventage/envsubst

Weekly Downloads

389

Version

0.17.0

License

MIT

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • peschee
  • niklaus-hug