Skip to content

Commit

Permalink
Merge pull request reduxjs#1224 from ashaffer/top-level-imports
Browse files Browse the repository at this point in the history
Move exported functions to the top-level src folder
  • Loading branch information
gaearon committed Jan 12, 2016
2 parents 855ac39 + c221a5f commit 83353b8
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import mapValues from './mapValues'
import mapValues from './utils/mapValues'

function bindActionCreator(actionCreator, dispatch) {
return (...args) => dispatch(actionCreator(...args))
Expand Down
8 changes: 4 additions & 4 deletions src/utils/combineReducers.js → src/combineReducers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionTypes } from '../createStore'
import isPlainObject from './isPlainObject'
import mapValues from './mapValues'
import pick from './pick'
import { ActionTypes } from './createStore'
import isPlainObject from './utils/isPlainObject'
import mapValues from './utils/mapValues'
import pick from './utils/pick'

/* eslint-disable no-console */

Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import createStore from './createStore'
import combineReducers from './utils/combineReducers'
import bindActionCreators from './utils/bindActionCreators'
import applyMiddleware from './utils/applyMiddleware'
import compose from './utils/compose'
import combineReducers from './combineReducers'
import bindActionCreators from './bindActionCreators'
import applyMiddleware from './applyMiddleware'
import compose from './compose'

export {
createStore,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import expect from 'expect'
import { createStore, applyMiddleware } from '../../src/index'
import * as reducers from '../helpers/reducers'
import { addTodo, addTodoAsync, addTodoIfEmpty } from '../helpers/actionCreators'
import { thunk } from '../helpers/middleware'
import { createStore, applyMiddleware } from '../src/index'
import * as reducers from './helpers/reducers'
import { addTodo, addTodoAsync, addTodoIfEmpty } from './helpers/actionCreators'
import { thunk } from './helpers/middleware'

describe('applyMiddleware', () => {
it('wraps dispatch method with middleware once', () => {
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('applyMiddleware', () => {
{
id: 1,
text: 'Hello'
},
},
{
id: 2,
text: 'World'
Expand All @@ -81,11 +81,11 @@ describe('applyMiddleware', () => {
{
id: 1,
text: 'Hello'
},
},
{
id: 2,
text: 'World'
},
},
{
id: 3,
text: 'Maybe'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import expect from 'expect'
import { bindActionCreators, createStore } from '../../src'
import { todos } from '../helpers/reducers'
import * as actionCreators from '../helpers/actionCreators'
import { bindActionCreators, createStore } from '../src'
import { todos } from './helpers/reducers'
import * as actionCreators from './helpers/actionCreators'

describe('bindActionCreators', () => {
let store
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import expect from 'expect'
import { combineReducers } from '../../src'
import createStore, { ActionTypes } from '../../src/createStore'
import { combineReducers } from '../src'
import createStore, { ActionTypes } from '../src/createStore'

describe('Utils', () => {
describe('combineReducers', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/compose.spec.js → test/compose.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import expect from 'expect'
import { compose } from '../../src'
import { compose } from '../src'

describe('Utils', () => {
describe('compose', () => {
Expand Down

0 comments on commit 83353b8

Please sign in to comment.