Skip to content

Quickly generate a TypeScript declaration file for your .env files

Notifications You must be signed in to change notification settings

jackstudd/react-native-config-codegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Config TypeScript declaration generator

Small CLI tool to generate a env.d.ts file for your react-native-config variables.

Installation

Install the package :

yarn add --dev react-native-config-codegen

Usage

Add a script in your package.json file :

{
  "scripts": {
    "codegen-env": "react-native-config-codegen .env"
  }
}

Multiple config files

If you have multiple .env files for different environments like .env.dev, .env.staging, .env.prod, you just have to pass each of them to the script :

{
  "scripts": {
    "codegen-env": "react-native-config-codegen .env.dev .env.staging .env.prod"
  }
}

About

Quickly generate a TypeScript declaration file for your .env files

Resources

Stars

Watchers

Forks

Packages

No packages published