1.1.2 • Published 3 years ago

dotenv-types-generator v1.1.2

Weekly downloads
29
License
MIT
Repository
github
Last release
3 years ago

dotenv-types-generator is a command line tool for automatically generating type declarations files (.d.ts) for your .env files

Get the benefits of a strongly typed .env file

demo

Getting Started

npx dotenv-types-generator

# Or using Yarn 2.x
yarn dlx dotenv-types-generator

By default, a .env file is expected in the root directory of the project. To specify a path, use the --file or -f flag

npx dotenv-types-generator -f [path/to/file/.env]

# Or using Yarn 2.x
yarn dlx dotenv-types-generator -f [path/to/file/.env]

Options

flagaliasdefault value
Path to .env file--file path/to/file/.env-f path/to/file/.env./.env
Optional/Nullable Types--optionalTypes-ofalse
Merge with existing env.d.ts file--mergeTypes-mfalse
Include project's default env properties--defaults PROP1 PROP2 PROP3-d PROP1 PROP2 PROP3
File Indentation Size (spaces)--indentationSize-i2
version--version-v
help--help-h

Development installation

git clone https://github.com/saulmaldonado/dotenv-types-generator.git

npm run build
# or
yarn build

npm link
# or
yarn link

npm link dotenv-types-generator
# or
yarn link dotenv-types-generator

Run tests

yarn test
# or
npm run test

Contribute

Issues and PRs are welcome! See CONTRIBUTING.md

Contributors

Show your support

Give a ⭐️ if this project helped you!


1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago