1.1.7 • Published 4 years ago

@intermatter/envelope v1.1.7

Weekly downloads
18
License
ISC
Repository
gitlab
Last release
4 years ago

Envelope

NPM package to enable cross-platform workflows with environment variables.

Installation

npm -i @intermatter/envelope

Usage

envelope RELATIVE_PATH/ENVIRONMENT_NAME 'COMMAND'

RELATIVE_PATH: specifies the location of the .env.ENVIRONMENT_NAME file relative to the package's root directory. If the dotenv file is located in the root directory, then ./ or NULL is used for RELATIVE_PATH.

ENVIRONMENT_NAME: myEnvironmentFile will set the file .env.myEnvironmentFile in the root of the package as the source of environment variables applied to the enclosed script.

COMMAND: Any npm-compatible or os-compatible command

##Example:

scripts:
{
    "some:test": "envelope ../development 'echo $FOO_BAR'"
}

Notice

  • If using double qoutes to enclose the command, it is necessary to manually escape the quotes and double escape $ character.
  • Using the absolute path for the environment file is not supported.
scripts:
{
    "some:test": "envelope development \"echo \\$FOO_BAR\""
}

Motivation

There is a number of cross-platform, portability and usability issues with other NPM packages that are designed to achieve similar functionality.

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago