This repository has been archived by the owner on Oct 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The project will use .env file to store build version and API_KEY NOTE: typescript module for react-native-dotenv has to be created. Placed in src/config/env.d.ts This module ensure Typescript that the environment variable in .env do exist and cause no issue check zetachang/react-native-dotenv#76 (comment)
- Loading branch information
1 parent
77b8080
commit 6642d82
Showing
5 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,4 @@ project-todo | |
android/release-keystore.properties | ||
android/.bundle | ||
android/vendor | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Create module to deal with Typescript error when pulling env values using react-native-dotenv | ||
// check https://github.com/zetachang/react-native-dotenv/issues/76#issuecomment-585171009 | ||
declare module 'react-native-dotenv' { | ||
export const BUILD_VERSION: 'development' | string; | ||
export const API_KEY: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1513,6 +1513,11 @@ | |
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" | ||
integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== | ||
|
||
"@types/react-native-dotenv@^0.2.0": | ||
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/@types/react-native-dotenv/-/react-native-dotenv-0.2.0.tgz#32c58422a422c1adf68acce363ed791314d5a8e7" | ||
integrity sha512-ZxX+dU/yoQc0jTk+/NWttkiuXceJyN5FpOSqDl0WynN5GDzxwH7OMruQ47qcY8llo2RD3irjvzJ9BwC8gDiq0A== | ||
|
||
"@types/react-native@^0.62.2": | ||
version "0.62.2" | ||
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.62.2.tgz#f3e150f308c27089cefbcbfa3eb6cc14db279b2f" | ||
|
@@ -2000,6 +2005,13 @@ babel-jest@^25.3.0: | |
chalk "^3.0.0" | ||
slash "^3.0.0" | ||
|
||
[email protected]: | ||
version "0.1.1" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-dotenv/-/babel-plugin-dotenv-0.1.1.tgz#9c8faea67a7c034fe7e94099187ab2e7573400bc" | ||
integrity sha1-nI+upnp8A0/n6UCZGHqy51c0ALw= | ||
dependencies: | ||
dotenv "^2.0.0" | ||
|
||
babel-plugin-dynamic-import-node@^2.3.0: | ||
version "2.3.0" | ||
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" | ||
|
@@ -2925,6 +2937,11 @@ domexception@^1.0.1: | |
dependencies: | ||
webidl-conversions "^4.0.2" | ||
|
||
dotenv@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-2.0.0.tgz#bd759c357aaa70365e01c96b7b0bec08a6e0d949" | ||
integrity sha1-vXWcNXqqcDZeAclrewvsCKbg2Uk= | ||
|
||
ecc-jsbn@~0.1.1: | ||
version "0.1.2" | ||
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" | ||
|
@@ -6665,6 +6682,13 @@ react-is@^16.12.0, react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1, react- | |
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" | ||
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== | ||
|
||
react-native-dotenv@^0.2.0: | ||
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/react-native-dotenv/-/react-native-dotenv-0.2.0.tgz#311551cb6a35a3dcfede648bded55c0e3ece579d" | ||
integrity sha1-MRVRy2o1o9z+3mSL3tVcDj7OV50= | ||
dependencies: | ||
babel-plugin-dotenv "0.1.1" | ||
|
||
[email protected]: | ||
version "2.5.1" | ||
resolved "https://registry.yarnpkg.com/react-native-drawer/-/react-native-drawer-2.5.1.tgz#08b9314184f48c724f1b467f8859797369798654" | ||
|