JSPM

react-native-config-codegen

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 41
  • Score
    100M100P100Q70351F
  • License MIT

Quickly generate a TypeScript declaration file for your .env files

Package Exports

  • react-native-config-codegen
  • react-native-config-codegen/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-config-codegen) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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"
  }
}