-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* - Add redux-thunk - Move store configuration into separate file - Purge unused redux-devtools-* packages * Enable inline source maps * Remove unused import * Drop eslint-config-airbnb due to unmet peer dependencies See airbnb/javascript#1283 * Update ESLint to use recommended settings and react plugin * Add mocha: true to suppress undefined describe/it functions * - Rename store/configureStore to store/default - Add missing import for redux.compose * Print extension installation errors * - Add --no-ignore flag to suppress warnings for ignored files - Remove --format option * Add scripts to eslint
- Loading branch information
Showing
10 changed files
with
60 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"presets": ["es2015", "stage-0", "react"], | ||
"plugins": ["transform-decorators-legacy", "transform-runtime"] | ||
"plugins": ["transform-decorators-legacy", "transform-runtime"], | ||
"sourceMaps": "inline", | ||
"retainLines": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { createStore, applyMiddleware, combineReducers, compose } from 'redux'; | ||
import thunk from 'redux-thunk'; | ||
|
||
import user from '../reducers/user'; | ||
import userActions from '../actions/user'; | ||
|
||
const actionCreators = { | ||
...userActions | ||
}; | ||
|
||
const reducers = { | ||
user | ||
}; | ||
|
||
const middlewares = [thunk]; | ||
|
||
const composeEnhancers = (() => { | ||
const compose_ = window && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; | ||
if(process.env.NODE_ENV === 'development' && compose_) { | ||
return compose_({ actionCreators }); | ||
} | ||
return compose; | ||
})(); | ||
|
||
const enhancer = composeEnhancers(applyMiddleware(...middlewares)); | ||
const rootReducer = combineReducers(reducers); | ||
|
||
export default function configureStore(initialState) { | ||
return createStore(rootReducer, initialState, enhancer); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
var path = require('path'); | ||
|
||
require('electron-compile').init(__dirname, './app/main'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters