1.3.0 • Published 1 year ago

match-env v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

match-env

Use an inline JavaScript expression to test environment variables.

Install

npm install match-env --save-dev
# Or
yarn add match-env --dev

Usage

Detection Mode

match-env "NODE_ENV=='test' && BUILD_TARGET!='node'" && echo yes || echo no

# build or noop
match-env 'CI==`true`' && yarn build || ':'

# handle `undefined`, same as `(process.env.FOO || globalThis.FOO)==`
match-env 'FOO==1' && yarn build || ':'

Call Mode

match-env 'FOO==1' -- yarn build
1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago