Skip to content
Draft
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
12 changes: 12 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends:
- eslint:recommended
- plugin:react/recommended
- standard-jsx

rules:
react/jsx-indent: off
react/jsx-indent-props: off

settings:
react:
version: detect
4 changes: 3 additions & 1 deletion App.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-env jasmine */

import React from 'react';
import App from './App';

Expand All @@ -6,4 +8,4 @@ import renderer from 'react-test-renderer';
it('renders without crashing', () => {
const rendered = renderer.create(<App />).toJSON();
expect(rendered).toBeTruthy();
});
});
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# React Native Web Starter
# React Native Web Starter with react-primitives

## Introduction

Expand Down Expand Up @@ -33,6 +33,7 @@ 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 lint` | Check results of eslint with very basic rules |
| `yarn start-expo` | Start the Expo packager |
| `yarn start-native` | Start the native packager (not supported) |
| `yarn eject-native` | Eject from Expo |
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"react": "16.5.1",
"react-dom": "^16.5.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz",
"react-native-web": "^0.11.2"
"react-native-web": "^0.11.2",
"react-primitives": "^0.8.0"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"web": "react-scripts start",
"build-web": "react-scripts build",
"lint": "eslint *.js src/**/*.js",
"start-expo": "expo start",
"start-native": "react-native-scripts start",
"eject-native": "react-native-scripts eject",
Expand All @@ -28,6 +30,10 @@
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"babel-preset-expo": "^4.0.0",
"eslint": "^5.16.0",
"eslint-config-standard-jsx": "^6.0.2",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-react": "^7.12.4",
"flow-bin": "^0.66.0",
"react-art": "16.5.1",
"react-native-scripts": "^1.13.1",
Expand Down
6 changes: 4 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-env amd */

import React from "react";
import { View, Text, Animated, StyleSheet } from "react-native";
import { View, Text, Animated, StyleSheet } from "react-primitives";

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

Expand Down Expand Up @@ -39,7 +41,7 @@ export default class App extends React.Component {
resizeMode={"contain"}
source={logo}
/>
<Text style={styles.appTitle}>Welcome to React Native Web️</Text>
<Text style={styles.appTitle}>Welcome to react-primitives demo</Text>
<Text style={styles.appSubtitle}>Vanilla Edition</Text>
</View>
<View style={{ alignItems: "center", flex: 3 }}>
Expand Down
3 changes: 3 additions & 0 deletions src/App.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-env browser */
/* eslint-env jasmine */

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-env browser */

import React from 'react';
import ReactDOM from 'react-dom';

Expand Down
4 changes: 4 additions & 0 deletions src/registerServiceWorker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/* eslint-env browser */
/* eslint-env node */
/* eslint no-console: off */

// In production, we register a service worker to serve assets from local cache.

// This lets the app load faster on subsequent visits in production, and gives
Expand Down
Loading