Skip to content

Commit

Permalink
Deleted react-native-config and made change between app and storybook…
Browse files Browse the repository at this point in the history
…s native
  • Loading branch information
pablonortiz committed Nov 29, 2023
1 parent 5cb18ef commit 389a92f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 30 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ dist/
.storybook_static
.docs

# .env
.env
# env.json
env.json
1 change: 0 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

import com.android.build.OutputFile

Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import Storybook from './storybook';
import Config from 'react-native-config';
import {LOAD_STORYBOOK} from './env.json';

const Component = Config.LOAD_STORYBOOK === 'true' ? Storybook : App;
const Component = LOAD_STORYBOOK ? Storybook : App;

AppRegistry.registerComponent(appName, () => Component);
24 changes: 2 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
"@react-native-community/datetimepicker": "^7.4.0",
"@react-native-community/slider": "^4.4.2",
"@storybook/cli": "^6.5.4",
"react-native-config": "^1.5.1",
"react-native-gesture-handler": ">=2.9.0 <=2.13.4",
"react-native-reanimated": "2.17.0",
"react-native-safe-area-context": "^4.6.4",
Expand Down
2 changes: 1 addition & 1 deletion scripts/set-app-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const modes = {
storybook: 1,
};

fs.writeFileSync('.env', `LOAD_STORYBOOK=${!!modes[mode]}`);
fs.writeFileSync('env.json', `{LOAD_STORYBOOK:${!!modes[mode]}}`);

0 comments on commit 389a92f

Please sign in to comment.