-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update eas ci workflow * Update package.json * add config
- Loading branch information
1 parent
519aff4
commit 0dc9d3a
Showing
5 changed files
with
81 additions
and
4 deletions.
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
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,30 @@ | ||
import { env } from '@src/consts' | ||
|
||
export interface ConfigBaseProps { | ||
persistNavigation: 'always' | 'dev' | 'prod' | 'never' | ||
catchErrors: 'always' | 'dev' | 'prod' | 'never' | ||
exitRoutes: string[] | ||
env: typeof env | ||
} | ||
|
||
export type PersistNavigationConfig = ConfigBaseProps['persistNavigation'] | ||
|
||
const BaseConfig = { | ||
// This feature is particularly useful in development mode, but | ||
// can be used in production as well if you prefer. | ||
persistNavigation: 'dev', | ||
|
||
/** | ||
* Only enable if we're catching errors in the right environment | ||
*/ | ||
catchErrors: 'always', | ||
|
||
/** | ||
* This is a list of all the route names that will exit the app if the back button | ||
* is pressed while in that screen. Only affects Android. | ||
*/ | ||
exitRoutes: ['Welcome'], | ||
env | ||
} as const | ||
|
||
export default BaseConfig |
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,10 @@ | ||
/** | ||
* These are configuration settings for the dev environment. | ||
* | ||
* Do not include API secrets in this file or anywhere in your JS. | ||
* | ||
* https://reactnative.dev/docs/security#storing-sensitive-info | ||
*/ | ||
export default { | ||
API_URL: 'https://api.rss2json.com/v1/', | ||
} |
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,10 @@ | ||
/** | ||
* These are configuration settings for the production environment. | ||
* | ||
* Do not include API secrets in this file or anywhere in your JS. | ||
* | ||
* https://reactnative.dev/docs/security#storing-sensitive-info | ||
*/ | ||
export default { | ||
API_URL: 'CHANGEME', | ||
} |
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,28 @@ | ||
/** | ||
* This file imports configuration objects from either the config.dev.js file | ||
* or the config.prod.js file depending on whether we are in __DEV__ or not. | ||
* | ||
* Note that we do not gitignore these files. Unlike on web servers, just because | ||
* these are not checked into your repo doesn't mean that they are secure. | ||
* In fact, you're shipping a JavaScript bundle with every | ||
* config variable in plain text. Anyone who downloads your app can easily | ||
* extract them. | ||
* | ||
* If you doubt this, just bundle your app, and then go look at the bundle and | ||
* search it for one of your config variable values. You'll find it there. | ||
* | ||
* Read more here: https://reactnative.dev/docs/security#storing-sensitive-info | ||
*/ | ||
import BaseConfig from './config.base' | ||
import DevConfig from './config.dev' | ||
import ProdConfig from './config.prod' | ||
|
||
let ExtraConfig = ProdConfig | ||
|
||
if (__DEV__) { | ||
ExtraConfig = DevConfig | ||
} | ||
|
||
const Config = { ...BaseConfig, ...ExtraConfig } as const | ||
|
||
export default Config |