react-native-dotenv
Advanced tools
Comparing version 2.2.6 to 2.3.0
@@ -31,3 +31,3 @@ const {readFileSync} = require('fs') | ||
safe: false, | ||
allowUndefined: false, | ||
allowUndefined: true, | ||
...this.opts | ||
@@ -34,0 +34,0 @@ } |
{ | ||
"name": "react-native-dotenv", | ||
"version": "2.2.6", | ||
"version": "2.3.0", | ||
"description": "Load environment variables using import statements.", | ||
@@ -24,3 +24,3 @@ "repository": "github:goatandsheep/react-native-dotenv", | ||
"devDependencies": { | ||
"@babel/core": "7.11.0", | ||
"@babel/core": "7.11.1", | ||
"codecov": "^3.7.2", | ||
@@ -27,0 +27,0 @@ "jest": "26.2.2", |
@@ -16,14 +16,10 @@ # react-native-dotenv [![CircleCI](https://circleci.com/gh/goatandsheep/react-native-dotenv.svg?style=svg)](https://circleci.com/gh/goatandsheep/react-native-dotenv) | ||
## Story | ||
## Introduction | ||
Many have been asking about recent changes in this repo. Take a look at the | ||
[story wiki page](https://github.com/goatandsheep/react-native-dotenv/wiki/Story-of-this-repo). | ||
**Breaking changes**: moving from `v0.x` to `v2.x` changes both the setup and usage of this package. Please see the [migration guide](https://github.com/goatandsheep/react-native-dotenv/wiki/Migration-Guide). | ||
Many have been asking about the reasons behind recent changes in this repo. Please see the [story wiki page](https://github.com/goatandsheep/react-native-dotenv/wiki/Story-of-this-repo). | ||
If you'd like to become an active contributor, please send us a message. | ||
## Migration | ||
For those moving from v0.2.0 to the latest version, you will find it is quite | ||
the jump. We are working on a [migration guide](https://github.com/goatandsheep/react-native-dotenv/wiki/Migration-Guide). | ||
## Usage | ||
@@ -33,5 +29,17 @@ | ||
Basic setup: | ||
```json | ||
{ | ||
"plugins": [ | ||
["module:react-native-dotenv"] | ||
] | ||
} | ||
``` | ||
If the defaults do not cut it for your project, this outlines the available options for your Babel configuration and their respective default values, but you do not need to add them if you are using the default settings. | ||
```json | ||
{ | ||
"plugins": [ | ||
["module:react-native-dotenv", { | ||
@@ -43,3 +51,3 @@ "moduleName": "@env", | ||
"safe": false, | ||
"allowUndefined": false | ||
"allowUndefined": true | ||
}] | ||
@@ -50,2 +58,4 @@ ] | ||
Note: for safe mode, it's highly recommended to set `allowUndefined` to `false`. | ||
**.env** | ||
@@ -52,0 +62,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20026
174