process-env-parser icon indicating copy to clipboard operation
process-env-parser copied to clipboard

Consider supporting dotfiles

Open teijo opened this issue 5 years ago • 1 comments

Reading ".env" files is very close to what the library is doing already. The API could be expanded to parsing also these files with e.g. const result = requireEnvironmentFile(filePath: string).

dotenv package as a reference: https://github.com/motdotla/dotenv

teijo avatar Jan 14 '20 23:01 teijo

Hmm, scratch that?

User should probably just use the env file loader and then use this library to validate the result of merged config file and environment variables. dotenv just populates process.env, which would then be read by process-env-parser.

teijo avatar Jan 14 '20 23:01 teijo