Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
.env.development.local
.env.test.local
.env.production.local
.*.swp

npm-debug.log*
yarn-debug.log*
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ It is bootstrapped with [Create React App](https://github.com/facebook/create-re

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.

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:
- <https://github.com/facebook/create-react-app#popular-alternatives>
- <https://reactjs.org/docs/add-react-to-a-website.html>

## Branches

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

### Future Plans for this Library

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

#### Tasks

* Get jest working properly
* ReasonML

### Credit
Expand Down
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"expo": "^27.0.0",
"expo": "^28.0.0",
"react": "16.5.1",
"react-dom": "^16.5.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-27.0.0.tar.gz",
"react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
"react-native-web": "^0.11.2"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"web": "react-scripts start",
"build-web": "react-scripts build",
"test-web": "react-scripts test --env=jsdom",
"eject-web": "react-scripts eject",
"start-expo": "expo start",
"start-native": "react-native-scripts start",
"eject-native": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test-native": "node node_modules/jest/bin/jest.js --watch",
"test": "yarn run test-web && yarn run test-native"
"test": "echo 'not supported' && exit 1"
},
"jest": {
"preset": "jest-expo"
Expand All @@ -31,10 +29,9 @@
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"babel-preset-expo": "^4.0.0",
"flow-bin": "^0.66.0",
"react-scripts": "1.1.4",
"react-art": "16.5.1",
"jest-expo": "^27.0.0",
"react-native-scripts": "^1.13.1",
"react-scripts": "1.1.4",
"react-test-renderer": "16.5.1"
}
}
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from "react";
import { View, Text, Animated, StyleSheet, StatusBar } from "react-native";
import { View, Text, Animated, StyleSheet } from "react-native";

const logo = require("./assets/react-logo.png");

export default class App extends React.Component {
constructor(props) {
Expand All @@ -15,8 +17,6 @@ export default class App extends React.Component {
duration: 1005
})
).start();

StatusBar.setBarStyle("light-content");
}

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