Merge pull request 'Fix uri path' (#10) from fix-env into master

Reviewed-on: billnerds/rn-playground#10
This commit is contained in:
Kat Huang 2024-01-06 23:38:19 -07:00
commit 411d5720b9
5 changed files with 54 additions and 46 deletions

2
.env Normal file
View File

@ -0,0 +1,2 @@
# .env.development
API_URI=https://api-dev.example.com/graphql

View File

@ -1,2 +1,2 @@
# .env.development # .env.development
API_URI=https://api-dev.example.com/graphql API_URI=https://api-dev.railbird.ai/graphql

View File

@ -1,2 +1,2 @@
# .env.production # .env.production
API_URI=https://api.example.com/graphql API_URI=https://api-dev.railbird.ai/graphql

View File

@ -1,45 +1,44 @@
{ {
"name": "railbird-rn", "name": "railbird-rn",
"version": "1.0.0", "version": "1.0.0",
"main": "node_modules/expo/AppEntry.js", "main": "node_modules/expo/AppEntry.js",
"scripts": { "scripts": {
"start": "expo start", "start": "cp .env.development .env && expo start",
"android": "expo start --android", "android": "expo start --android",
"ios": "expo start --ios", "ios": "expo start --ios",
"web": "expo start --web", "web": "expo start --web",
"lint": "eslint . --ext .js,.ts,.tsx", "lint": "eslint . --ext .js,.ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix", "lint:fix": "eslint . --ext .ts,.tsx --fix",
"start:dev": "ENVFILE=.env.development react-native start", "test": "jest"
"start:prod": "ENVFILE=.env.production react-native start", },
"test": "jest" "jest": {
}, "preset": "jest-expo",
"jest": { "transformIgnorePatterns": [
"preset": "jest-expo", "node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)"
"transformIgnorePatterns": [ ]
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)" },
] "dependencies": {
}, "@types/react": "~18.2.14",
"dependencies": { "@typescript-eslint/eslint-plugin": "^6.17.0",
"@types/react": "~18.2.14", "@typescript-eslint/parser": "^6.17.0",
"@typescript-eslint/eslint-plugin": "^6.17.0", "babel-plugin-inline-dotenv": "^1.7.0",
"@typescript-eslint/parser": "^6.17.0", "eslint": "^8.56.0",
"eslint": "^8.56.0", "eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.1.0",
"eslint-plugin-react-native": "^4.1.0", "expo": "~49.0.15",
"expo": "~49.0.15", "expo-status-bar": "~1.6.0",
"expo-status-bar": "~1.6.0", "jest": "^29.2.1",
"jest": "^29.2.1", "jest-expo": "~49.0.0",
"jest-expo": "~49.0.0", "react": "18.2.0",
"react": "18.2.0", "react-native": "0.72.6",
"react-native": "0.72.6", "react-native-dotenv": "^3.4.9",
"react-native-dotenv": "^3.4.9", "typescript": "^5.3.3"
"typescript": "^5.3.3" },
}, "devDependencies": {
"devDependencies": { "@babel/core": "^7.20.0",
"@babel/core": "^7.20.0", "@types/jest": "^29.5.11",
"@types/jest": "^29.5.11", "eslint-config-prettier": "^9.1.0"
"eslint-config-prettier": "^9.1.0" },
}, "private": true
"private": true
} }

View File

@ -2813,6 +2813,13 @@ babel-jest@^29.2.1, babel-jest@^29.7.0:
graceful-fs "^4.2.9" graceful-fs "^4.2.9"
slash "^3.0.0" slash "^3.0.0"
babel-plugin-inline-dotenv@^1.7.0:
version "1.7.0"
resolved "https://registry.yarnpkg.com/babel-plugin-inline-dotenv/-/babel-plugin-inline-dotenv-1.7.0.tgz#c4b9f9752678be4b49a6b5d3d2b47def741a4d5f"
integrity sha512-FUrXEwY9R9ZO8l0NFHqXFBzHjjMvdIJlELrzJoE6imDsj6Vh7g9svm7iHPHVYPbHmt6BPB2eCAJkwvG6kr5byg==
dependencies:
dotenv "^16.0.0"
babel-plugin-istanbul@^6.1.1: babel-plugin-istanbul@^6.1.1:
version "6.1.1" version "6.1.1"
resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73"
@ -3746,7 +3753,7 @@ dotenv-expand@~10.0.0:
resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37"
integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==
dotenv@^16.3.1: dotenv@^16.0.0, dotenv@^16.3.1:
version "16.3.1" version "16.3.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==