Skip to content

Commit 38e32cd

Browse files
committed
move native files around again!
1 parent 9fef85f commit 38e32cd

File tree

9 files changed

+23
-21
lines changed

9 files changed

+23
-21
lines changed

packages/react-router-native/android/BackButton.js renamed to packages/react-router-native/AndroidBackButton.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component, PropTypes } from 'react'
22
import { BackAndroid } from 'react-native'
33

4-
class BackButton extends Component {
4+
class AndroidBackButton extends Component {
55
static contextTypes = {
66
router: PropTypes.object
77
}
@@ -29,4 +29,4 @@ class BackButton extends Component {
2929
}
3030
}
3131

32-
export default BackButton
32+
export default AndroidBackButton

packages/react-router-native/index.android.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React, { Component } from 'react'
22
import { AppRegistry, StyleSheet, Text, View } from 'react-native'
33

4-
import { NativeRouter, Route, Link, DeepLinking } from './index'
5-
import BackButton from './android/BackButton'
4+
import { NativeRouter, Route, Link, DeepLinking, AndroidBackButton } from './main'
65

76
export default class ReactRouterNative extends Component {
87
render() {

packages/react-router-native/index.ios.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import {
1212
View
1313
} from 'react-native';
1414

15-
import { NativeRouter, Route, Link, DeepLinking } from './index'
15+
import { NativeRouter, Route, Link, DeepLinking } from './main'
1616

1717
export default class ReactRouterNative extends Component {
1818
render() {
1919
return (
20-
<NativeRouter deepLinks={true}>
20+
<NativeRouter>
2121
<View style={styles.container}>
2222
<DeepLinking/>
2323
<Route exact path="/" render={() => (

packages/react-router-native/index.js

-10
This file was deleted.

packages/react-router-native/main.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export * from 'react-router'
2+
import NativeRouter from './NativeRouter'
3+
import Link from './Link'
4+
import DeepLinking from './DeepLinking'
5+
import AndroidBackButton from './AndroidBackButton'
6+
7+
export {
8+
NativeRouter,
9+
Link,
10+
DeepLinking,
11+
AndroidBackButton
12+
}

packages/react-router-native/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22
"name": "react-router-native",
33
"version": "0.0.1",
44
"private": true,
5+
"main": "main.js",
56
"scripts": {
67
"start": "node node_modules/react-native/local-cli/cli.js start",
78
"test": "jest"
89
},
910
"files": {
10-
"index.js",
11-
"modules/DeepLinking.js",
12-
"modules/Link.js",
13-
"modules/NativeRouter.js",
14-
"android/BackButton.js"
11+
"main.js",
12+
"DeepLinking.js",
13+
"Link.js",
14+
"NativeRouter.js",
15+
"AndroidBackButton.js"
1516
},
1617
"dependencies": {
1718
"react": "~15.4.0-rc.4",

0 commit comments

Comments
 (0)