Skip to content

Commit

Permalink
Export modules useful for moving stack navigator outside of core
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvatne committed Aug 3, 2018
1 parent 4a5da86 commit 04a4512
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/createNavigationContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import NavigationActions from './NavigationActions';
import getNavigation from './getNavigation';
import invariant from './utils/invariant';
import docsUrl from './utils/docsUrl';
import { urlToPathAndParams } from './routers/pathUtils';
import { urlToPathAndParams } from './routers/PathUtils';

function isStateful(props) {
return !props.navigation;
Expand Down
12 changes: 12 additions & 0 deletions src/react-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ module.exports = {
get SwitchRouter() {
return require('./routers/SwitchRouter').default;
},
get createConfigGetter() {
return require('./routers/createConfigGetter').default;
},
get getScreenForRouteName() {
return require('./routers/getScreenForRouteName').default;
},
get validateRouteConfigMap() {
return require('./routers/validateRouteConfigMap').default;
},
get PathUtils() {
return require('./routers/PathUtils').default;
},

// Views
get Transitioner() {
Expand Down
2 changes: 1 addition & 1 deletion src/routers/StackRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import StateUtils from '../StateUtils';
import validateRouteConfigMap from './validateRouteConfigMap';
import invariant from '../utils/invariant';
import { generateKey } from './KeyGenerator';
import { createPathParser } from './pathUtils';
import { createPathParser } from './PathUtils';

function behavesLikePushAction(action) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/routers/SwitchRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import createConfigGetter from './createConfigGetter';
import NavigationActions from '../NavigationActions';
import StackActions from './StackActions';
import validateRouteConfigMap from './validateRouteConfigMap';
import { createPathParser } from './pathUtils';
import { createPathParser } from './PathUtils';

const defaultActionCreators = (route, navStateKey) => ({});

Expand Down
2 changes: 1 addition & 1 deletion src/routers/__tests__/PathHandling-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import SwitchRouter from '../SwitchRouter';
import StackRouter from '../StackRouter';
import StackActions from '../StackActions';
import NavigationActions from '../../NavigationActions';
import { urlToPathAndParams } from '../pathUtils';
import { urlToPathAndParams } from '../PathUtils';
import { _TESTING_ONLY_normalize_keys } from '../KeyGenerator';

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/routers/__tests__/pathUtils-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { urlToPathAndParams } from '../pathUtils';
import { urlToPathAndParams } from '../PathUtils';

test('urlToPathAndParams empty', () => {
const { path, params } = urlToPathAndParams('foo://');
Expand Down

0 comments on commit 04a4512

Please sign in to comment.