Skip to content

Commit 5b4afdb

Browse files
authored
Merge pull request #17 from brodybits/some-updates
Some proposed updates
2 parents 055b465 + be596f6 commit 5b4afdb

File tree

5 files changed

+85
-745
lines changed

5 files changed

+85
-745
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
.env.development.local
1717
.env.test.local
1818
.env.production.local
19+
.*.swp
1920

2021
npm-debug.log*
2122
yarn-debug.log*

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ It is bootstrapped with [Create React App](https://github.com/facebook/create-re
1010

1111
It has then been integrated with [Create React Native App](https://github.com/react-community/create-react-native-app) and running `yarn ios` or `yarn android` will start the Expo packager. You can also run the project from the Expo XDE program.
1212

13+
Note that it should be possible to eject from Expo to native using `yarn eject-native`, however it is not possible to automatically eject from CRA web build. There are quite a few ways to manually port out of CRA web build as described in the following resources:
14+
- <https://github.com/facebook/create-react-app#popular-alternatives>
15+
- <https://reactjs.org/docs/add-react-to-a-website.html>
16+
1317
## Branches
1418

1519
| Branch | Description |
@@ -29,14 +33,12 @@ A full list of the scripts defined in `package.json` is shown below.
2933
| ------------------- | ------------------------------------------------------- |
3034
| `yarn web` | Start CRA Development Build |
3135
| `yarn build-web` | Create production build for web |
32-
| `yarn eject-web` | Eject from CRA |
33-
| `yarn start-native` | Start the Expo packager |
36+
| `yarn start-expo` | Start the Expo packager |
37+
| `yarn start-native` | Start the native packager (not supported) |
3438
| `yarn eject-native` | Eject from Expo |
3539
| `yarn android` | Start expo packager and install app to Android Emulator |
3640
| `yarn ios` | Start expo packager and install app to iOS Simulator |
37-
| `yarn test-native` | Run testing script for mobile app |
38-
| `yarn test-web` | Run testing script for web app |
39-
| `yarn test` | Run both testing scripts |
41+
| `yarn test` | not supported |
4042

4143
### Future Plans for this Library
4244

@@ -50,7 +52,6 @@ If you have any ideas for a boilerplate then please create an issue or even bett
5052

5153
#### Tasks
5254

53-
* Get jest working properly
5455
* ReasonML
5556

5657
### Credit

package.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,22 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"expo": "^27.0.0",
6+
"expo": "^28.0.0",
77
"react": "16.5.1",
88
"react-dom": "^16.5.1",
9-
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
9+
"react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
1010
"react-native-web": "^0.11.2"
1111
},
1212
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
1313
"scripts": {
1414
"web": "react-scripts start",
1515
"build-web": "react-scripts build",
16-
"test-web": "react-scripts test --env=jsdom",
17-
"eject-web": "react-scripts eject",
16+
"start-expo": "expo start",
1817
"start-native": "react-native-scripts start",
1918
"eject-native": "react-native-scripts eject",
2019
"android": "react-native-scripts android",
2120
"ios": "react-native-scripts ios",
22-
"test-native": "node node_modules/jest/bin/jest.js --watch",
23-
"test": "yarn run test-web && yarn run test-native"
21+
"test": "echo 'not supported' && exit 1"
2422
},
2523
"jest": {
2624
"preset": "jest-expo"
@@ -31,10 +29,9 @@
3129
"babel-plugin-transform-react-jsx-source": "^6.22.0",
3230
"babel-preset-expo": "^4.0.0",
3331
"flow-bin": "^0.66.0",
34-
"react-scripts": "1.1.4",
3532
"react-art": "16.5.1",
36-
"jest-expo": "^27.0.0",
3733
"react-native-scripts": "^1.13.1",
34+
"react-scripts": "1.1.4",
3835
"react-test-renderer": "16.5.1"
3936
}
4037
}

src/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react";
2-
import { View, Text, Animated, StyleSheet, StatusBar } from "react-native";
2+
import { View, Text, Animated, StyleSheet } from "react-native";
3+
4+
const logo = require("./assets/react-logo.png");
35

46
export default class App extends React.Component {
57
constructor(props) {
@@ -15,8 +17,6 @@ export default class App extends React.Component {
1517
duration: 1005
1618
})
1719
).start();
18-
19-
StatusBar.setBarStyle("light-content");
2020
}
2121

2222
render() {
@@ -37,7 +37,7 @@ export default class App extends React.Component {
3737
<Animated.Image
3838
style={[styles.headerImage, rotationStyle]}
3939
resizeMode={"contain"}
40-
source={require("./assets/react-logo.png")}
40+
source={logo}
4141
/>
4242
<Text style={styles.appTitle}>Welcome to React Native Web️</Text>
4343
<Text style={styles.appSubtitle}>Vanilla Edition</Text>

0 commit comments

Comments
 (0)