-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⭐ First commit: project initialization ⭐
- Loading branch information
0 parents
commit 4571680
Showing
10 changed files
with
7,244 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"presets": ["babel-preset-expo"], | ||
"env": { | ||
"development": { | ||
"plugins": ["transform-react-jsx-source"] | ||
} | ||
} | ||
} |
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,75 @@ | ||
[ignore] | ||
; We fork some components by platform | ||
.*/*[.]android.js | ||
|
||
; Ignore templates for 'react-native init' | ||
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.* | ||
|
||
; Ignore RN jest | ||
<PROJECT_ROOT>/node_modules/react-native/jest/.* | ||
|
||
; Ignore RNTester | ||
<PROJECT_ROOT>/node_modules/react-native/RNTester/.* | ||
|
||
; Ignore the website subdir | ||
<PROJECT_ROOT>/node_modules/react-native/website/.* | ||
|
||
; Ignore the Dangerfile | ||
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js | ||
|
||
; Ignore Fbemitter | ||
<PROJECT_ROOT>/node_modules/fbemitter/.* | ||
|
||
; Ignore "BUCK" generated dirs | ||
<PROJECT_ROOT>/node_modules/react-native/\.buckd/ | ||
|
||
; Ignore unexpected extra "@providesModule" | ||
.*/node_modules/.*/node_modules/fbjs/.* | ||
|
||
; Ignore polyfills | ||
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.* | ||
|
||
; Ignore various node_modules | ||
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.* | ||
<PROJECT_ROOT>/node_modules/expo/.* | ||
<PROJECT_ROOT>/node_modules/react-navigation/.* | ||
<PROJECT_ROOT>/node_modules/xdl/.* | ||
<PROJECT_ROOT>/node_modules/reqwest/.* | ||
<PROJECT_ROOT>/node_modules/metro-bundler/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow/ | ||
node_modules/expo/flow/ | ||
|
||
[options] | ||
emoji=true | ||
|
||
module.system=haste | ||
|
||
module.file_ext=.js | ||
module.file_ext=.jsx | ||
module.file_ext=.json | ||
module.file_ext=.ios.js | ||
|
||
munge_underscores=true | ||
|
||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FlowFixMeProps | ||
suppress_type=$FlowFixMeState | ||
suppress_type=$FixMe | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
|
||
unsafe.enable_getters_and_setters=true | ||
|
||
[version] | ||
^0.56.0 |
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,53 @@ | ||
# See https://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# expo | ||
.expo/ | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# misc | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# OS X | ||
.DS_Store | ||
|
||
# Android builds | ||
*.apk | ||
*.ap_ | ||
|
||
# files for the dex VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# generated files | ||
bin/ | ||
gen/ | ||
build/ | ||
build.log | ||
|
||
# XCode | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.xcuserstatee | ||
|
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 @@ | ||
{} |
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,23 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
|
||
export default class App extends React.Component { | ||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Open up App.js to start working on your app!</Text> | ||
<Text>Changes you make will automatically reload.</Text> | ||
<Text>Shake your phone to open the developer menu.</Text> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); |
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,9 @@ | ||
import React from 'react'; | ||
import App from './App'; | ||
|
||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders without crashing', () => { | ||
const rendered = renderer.create(<App />).toJSON(); | ||
expect(rendered).toBeTruthy(); | ||
}); |
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,39 @@ | ||
This is the mobile version of Gutenberg, targetting Android and iOS. It's a React Native library bootstrapped by CRNA. | ||
|
||
## Full Documentation | ||
|
||
The most recent and complete version of this guide is available [here](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md). | ||
|
||
## Available Scripts | ||
|
||
If Yarn was installed when the project was initialized, then dependencies will have been installed via Yarn, and you should probably use it to run these commands as well. Unlike dependency installation, command running syntax is identical for Yarn and NPM at the time of this writing. | ||
|
||
### `npm start` | ||
|
||
Runs your app in development mode. | ||
|
||
Open it in the [Expo app](https://expo.io) on your phone to view it. It will reload if you save edits to your files, and you will see build errors and logs in the terminal. | ||
|
||
Sometimes you may need to reset or clear the React Native packager's cache. To do so, you can pass the `--reset-cache` flag to the start script: | ||
|
||
``` | ||
npm start -- --reset-cache | ||
# or | ||
yarn start -- --reset-cache | ||
``` | ||
|
||
#### `npm test` | ||
|
||
Runs the [jest](https://github.com/facebook/jest) test runner on your tests. | ||
|
||
#### `npm run ios` | ||
|
||
Like `npm start`, but also attempts to open your app in the iOS Simulator if you're on a Mac and have it installed. | ||
|
||
#### `npm run android` | ||
|
||
Like `npm start`, but also attempts to open your app on a connected Android device or emulator. Requires an installation of Android build tools (see [React Native docs](https://facebook.github.io/react-native/docs/getting-started.html) for detailed setup). We also recommend installing Genymotion as your Android emulator. Once you've finished setting up the native build environment, there are two options for making the right copy of `adb` available to Create React Native App: | ||
|
||
## Writing and Running Tests | ||
|
||
This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` or with the `.test` extension to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/App.test.js) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/en/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/en/tutorial-react-native.html). |
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,5 @@ | ||
{ | ||
"expo": { | ||
"sdkVersion": "25.0.0" | ||
} | ||
} |
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,26 @@ | ||
{ | ||
"name": "gutenberg-mobile", | ||
"version": "0.1.0", | ||
"private": true, | ||
"devDependencies": { | ||
"react-native-scripts": "1.11.1", | ||
"jest-expo": "25.0.0", | ||
"react-test-renderer": "16.2.0" | ||
}, | ||
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", | ||
"scripts": { | ||
"start": "react-native-scripts start", | ||
"eject": "react-native-scripts eject", | ||
"android": "react-native-scripts android", | ||
"ios": "react-native-scripts ios", | ||
"test": "node node_modules/jest/bin/jest.js" | ||
}, | ||
"jest": { | ||
"preset": "jest-expo" | ||
}, | ||
"dependencies": { | ||
"expo": "^25.0.0", | ||
"react": "16.2.0", | ||
"react-native": "0.52.0" | ||
} | ||
} |
Oops, something went wrong.