Skip to content

Commit

Permalink
Initial public release of React Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Miskiewicz authored and James Ide committed Jan 26, 2017
0 parents commit c37ad8a
Show file tree
Hide file tree
Showing 391 changed files with 51,942 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"env": {
// For RN example development
"development": {
"presets": ["react-native"],
"plugins": [
"transform-flow-strip-types",
],
},
// For Jest
"test": {
"presets": ["react-native"],
"plugins": [
"transform-flow-strip-types",
],
},
// For publishing to NPM for RN
"publish-rn": {
"presets": ["react-native-syntax"],
"plugins": [
"transform-flow-strip-types",
],
},
// For publishing to NPM for RN
"publish-web": {
"presets": ["es2015", "stage-1", "react"],
"plugins": [
"transform-flow-strip-types",
],
},
},
}
77 changes: 77 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"extends": "airbnb",
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"env": {
"jasmine": true
},
"rules": {
"no-underscore-dangle": 0,
"no-use-before-define": 0,
"no-unused-expressions": 0,
"new-cap": 0,
"no-plusplus": 0,
"no-class-assign": 0,
"no-duplicate-imports": 0,

"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"import/no-unresolved": 0,

"react/jsx-filename-extension": [
0, { "extensions": [".js", ".jsx"] }
],
"react/forbid-prop-types": 0,
"react/sort-comp": 0,
"react/prefer-stateless-function": 0,

"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/no-weak-types": 1,
"flowtype/require-parameter-type": 2,
"flowtype/require-return-type": [
0,
"always",
{
"annotateUndefined": "never"
}
],
"flowtype/require-valid-file-annotation": 2,
"flowtype/semi": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": false
}
}
}
55 changes: 55 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore templates for 'react-native init'
.*/local-cli/templates/.*

; Ignore the website subdir
.*/node_modules/react-native/website/.*

; Ignore "BUCK" generated dirs
.*/node_modules/react-native/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*

; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/node_modules/react-native/Libraries/react-native/React.js
.*/node_modules/react-native/Libraries/react-native/ReactNative.js

<PROJECT_ROOT>/lib
<PROJECT_ROOT>/lib-rn
<PROJECT_ROOT>/examples
<PROJECT_ROOT>/website

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
flow/

[options]
module.system=haste

experimental.strict_type_args=true

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=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
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]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

unsafe.enable_getters_and_setters=true

[version]
^0.35.0
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# VSCode
.vscode/
jsconfig.json

# NodeJS
npm-debug.log
node_modules
lib-rn
lib
yarn-error.log

# OS X
.DS_Store

# Exponent
.exponent
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
BSD License

For React Navigation software

Copyright (c) 2016-present, React Navigation Contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17 changes: 17 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Please provide enough information so that others can review your pull request:

Explain the **motivation** for making this change. What existing problem does the pull request solve?

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.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure you test on both platforms if your change affects both platforms.

The code must pass tests and shouldn't add more Flow errors.

**Code formatting**

Look around. Match the style of the rest of the codebase.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# React Navigation [![Circle CI](https://circleci.com/gh/reactjs/react-navigation.svg?style=svg&circle-token=296a074544f10b6580652bd283b2c1817154dc20)](https://circleci.com/gh/reactjs/react-navigation)

*Learn once, navigate anywhere.*

Browse the docs on [reactnavigation.org](https://navigate:[email protected]/). (The username/pass is `navigate:navigate`)

## [Getting started](https://reactnavigation.org/docs/intro/)

1. Create a new React Native App
```
react-native init SimpleApp
cd SimpleApp
```

2. Install the latest version of react-navigation from npm
```
yarn add react-navigation
```
or
```
npm install --save react-navigation
```

3. Run the new app
```
react-native run-android # or:
react-native run-ios
```

## Advanced guide

- [Redux integration](https://reactnavigation.org/docs/guides/redux)
- [Web integration](https://reactnavigation.org/docs/guides/web)
- [Deep linking](https://reactnavigation.org/docs/guides/linking)
- [Contributors guide](https://reactnavigation.org/docs/guides/contributors)

## React Navigation API

- [Navigators](https://reactnavigation.org/docs/navigators/)
- [Routers](https://reactnavigation.org/docs/routers/)
- [Views](https://reactnavigation.org/docs/views/)

23 changes: 23 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
machine:
node:
version: 6.1.0
pre:
- mkdir ~/.yarn-cache
dependencies:
pre:
# Install Yarn
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn
cache_directories:
- "~/.yarn-cache"
override:
- yarn install
- cd website && yarn install
deployment:
website-prod:
branch: master
commands:
- yarn run build-docs
- ./scripts/deploy-website.sh
Loading

0 comments on commit c37ad8a

Please sign in to comment.