1.0.10 • Published 3 years ago

env-to-types v1.0.10

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

env-to-types

WHAT THE PURPOSE ?

Transform your .env file as input 👌🏻

USER_DATABASE="user"
PASSWORD_DATABASE="password"

And generates a .d.ts file automatically

declare namespace NodeJS {
  export interface ProcessEnv {
    USER_DATABASE: string
    PASSWORD_DATABASE: string
  }
}

Now process.env.USER_DATABASE will autocomplete and SAFE.

USAGE

npx env-to-types path/to/.env

OPTIONS

-v, --version               Show the CLI Version
-h, --help                  Show CLI usage information
-o, --output-type           Output name/path for types files | default will be `env.d.ts`
-e, --env-path-example      Path to save generate .env.example file

EXAMPLE W/ OPTIONS

npx env-to-types .env -o src/types/env.d.ts -e .
1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago