Skip to content

Commit c37ad8a

Browse files
Adam MiskiewiczJames Ide
authored andcommitted
Initial public release of React Navigation
0 parents  commit c37ad8a

File tree

391 files changed

+51942
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+51942
-0
lines changed

.babelrc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"env": {
3+
// For RN example development
4+
"development": {
5+
"presets": ["react-native"],
6+
"plugins": [
7+
"transform-flow-strip-types",
8+
],
9+
},
10+
// For Jest
11+
"test": {
12+
"presets": ["react-native"],
13+
"plugins": [
14+
"transform-flow-strip-types",
15+
],
16+
},
17+
// For publishing to NPM for RN
18+
"publish-rn": {
19+
"presets": ["react-native-syntax"],
20+
"plugins": [
21+
"transform-flow-strip-types",
22+
],
23+
},
24+
// For publishing to NPM for RN
25+
"publish-web": {
26+
"presets": ["es2015", "stage-1", "react"],
27+
"plugins": [
28+
"transform-flow-strip-types",
29+
],
30+
},
31+
},
32+
}

.eslintrc

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"extends": "airbnb",
3+
"parser": "babel-eslint",
4+
"plugins": [
5+
"flowtype"
6+
],
7+
"env": {
8+
"jasmine": true
9+
},
10+
"rules": {
11+
"no-underscore-dangle": 0,
12+
"no-use-before-define": 0,
13+
"no-unused-expressions": 0,
14+
"new-cap": 0,
15+
"no-plusplus": 0,
16+
"no-class-assign": 0,
17+
"no-duplicate-imports": 0,
18+
19+
"import/extensions": 0,
20+
"import/no-extraneous-dependencies": 0,
21+
"import/no-unresolved": 0,
22+
23+
"react/jsx-filename-extension": [
24+
0, { "extensions": [".js", ".jsx"] }
25+
],
26+
"react/forbid-prop-types": 0,
27+
"react/sort-comp": 0,
28+
"react/prefer-stateless-function": 0,
29+
30+
"flowtype/boolean-style": [
31+
2,
32+
"boolean"
33+
],
34+
"flowtype/define-flow-type": 1,
35+
"flowtype/generic-spacing": [
36+
2,
37+
"never"
38+
],
39+
"flowtype/no-weak-types": 1,
40+
"flowtype/require-parameter-type": 2,
41+
"flowtype/require-return-type": [
42+
0,
43+
"always",
44+
{
45+
"annotateUndefined": "never"
46+
}
47+
],
48+
"flowtype/require-valid-file-annotation": 2,
49+
"flowtype/semi": [
50+
2,
51+
"always"
52+
],
53+
"flowtype/space-after-type-colon": [
54+
2,
55+
"always"
56+
],
57+
"flowtype/space-before-generic-bracket": [
58+
2,
59+
"never"
60+
],
61+
"flowtype/space-before-type-colon": [
62+
2,
63+
"never"
64+
],
65+
"flowtype/union-intersection-spacing": [
66+
2,
67+
"always"
68+
],
69+
"flowtype/use-flow-type": 1,
70+
"flowtype/valid-syntax": 1
71+
},
72+
"settings": {
73+
"flowtype": {
74+
"onlyFilesWithFlowAnnotation": false
75+
}
76+
}
77+
}

.flowconfig

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore templates for 'react-native init'
6+
.*/local-cli/templates/.*
7+
8+
; Ignore the website subdir
9+
.*/node_modules/react-native/website/.*
10+
11+
; Ignore "BUCK" generated dirs
12+
.*/node_modules/react-native/\.buckd/
13+
14+
; Ignore unexpected extra "@providesModule"
15+
.*/node_modules/.*/node_modules/fbjs/.*
16+
17+
; Ignore duplicate module providers
18+
; For RN Apps installed via npm, "Libraries" folder is inside
19+
; "node_modules/react-native" but in the source repo it is in the root
20+
.*/node_modules/react-native/Libraries/react-native/React.js
21+
.*/node_modules/react-native/Libraries/react-native/ReactNative.js
22+
23+
<PROJECT_ROOT>/lib
24+
<PROJECT_ROOT>/lib-rn
25+
<PROJECT_ROOT>/examples
26+
<PROJECT_ROOT>/website
27+
28+
[include]
29+
30+
[libs]
31+
node_modules/react-native/Libraries/react-native/react-native-interface.js
32+
node_modules/react-native/flow/
33+
flow/
34+
35+
[options]
36+
module.system=haste
37+
38+
experimental.strict_type_args=true
39+
40+
munge_underscores=true
41+
42+
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'
43+
44+
suppress_type=$FlowIssue
45+
suppress_type=$FlowFixMe
46+
suppress_type=$FixMe
47+
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
50+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
51+
52+
unsafe.enable_getters_and_setters=true
53+
54+
[version]
55+
^0.35.0

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# VSCode
2+
.vscode/
3+
jsconfig.json
4+
5+
# NodeJS
6+
npm-debug.log
7+
node_modules
8+
lib-rn
9+
lib
10+
yarn-error.log
11+
12+
# OS X
13+
.DS_Store
14+
15+
# Exponent
16+
.exponent

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
examples

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
BSD License
2+
3+
For React Navigation software
4+
5+
Copyright (c) 2016-present, React Navigation Contributors. All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice, this
11+
list of conditions and the following disclaimer.
12+
13+
* Redistributions in binary form must reproduce the above copyright notice,
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Please provide enough information so that others can review your pull request:
2+
3+
Explain the **motivation** for making this change. What existing problem does the pull request solve?
4+
5+
Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise split it.
6+
7+
**Test plan (required)**
8+
9+
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
10+
11+
Make sure you test on both platforms if your change affects both platforms.
12+
13+
The code must pass tests and shouldn't add more Flow errors.
14+
15+
**Code formatting**
16+
17+
Look around. Match the style of the rest of the codebase.

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# React Navigation [![Circle CI](https://circleci.com/gh/reactjs/react-navigation.svg?style=svg&circle-token=296a074544f10b6580652bd283b2c1817154dc20)](https://circleci.com/gh/reactjs/react-navigation)
2+
3+
*Learn once, navigate anywhere.*
4+
5+
Browse the docs on [reactnavigation.org](https://navigate:navigate@reactnavigation.org/). (The username/pass is `navigate:navigate`)
6+
7+
## [Getting started](https://reactnavigation.org/docs/intro/)
8+
9+
1. Create a new React Native App
10+
```
11+
react-native init SimpleApp
12+
cd SimpleApp
13+
```
14+
15+
2. Install the latest version of react-navigation from npm
16+
```
17+
yarn add react-navigation
18+
```
19+
or
20+
```
21+
npm install --save react-navigation
22+
```
23+
24+
3. Run the new app
25+
```
26+
react-native run-android # or:
27+
react-native run-ios
28+
```
29+
30+
## Advanced guide
31+
32+
- [Redux integration](https://reactnavigation.org/docs/guides/redux)
33+
- [Web integration](https://reactnavigation.org/docs/guides/web)
34+
- [Deep linking](https://reactnavigation.org/docs/guides/linking)
35+
- [Contributors guide](https://reactnavigation.org/docs/guides/contributors)
36+
37+
## React Navigation API
38+
39+
- [Navigators](https://reactnavigation.org/docs/navigators/)
40+
- [Routers](https://reactnavigation.org/docs/routers/)
41+
- [Views](https://reactnavigation.org/docs/views/)
42+

circle.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
machine:
2+
node:
3+
version: 6.1.0
4+
pre:
5+
- mkdir ~/.yarn-cache
6+
dependencies:
7+
pre:
8+
# Install Yarn
9+
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
10+
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
11+
- sudo apt-get update -qq
12+
- sudo apt-get install -y -qq yarn
13+
cache_directories:
14+
- "~/.yarn-cache"
15+
override:
16+
- yarn install
17+
- cd website && yarn install
18+
deployment:
19+
website-prod:
20+
branch: master
21+
commands:
22+
- yarn run build-docs
23+
- ./scripts/deploy-website.sh

0 commit comments

Comments
 (0)