Skip to content

Commit

Permalink
Minor docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
BiosBoy committed Jan 14, 2019
1 parent 57725dc commit c18de36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions server/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const webpack = require('webpack');
const webpackConfig = require('../webpack.config.js');

// -----------------------------
// STARTING APP COMPILATION PROCESS
// READING WEBPACK CONFIGURATION
// -----------------------------
function webpackCompiler() {
return new Promise((resolve, reject) => {
Expand All @@ -29,13 +29,13 @@ function webpackCompiler() {
}

// -----------------------------
// READING WEBPACK CONFIGURATION
// STARTING APP COMPILATION PROCESS
// -----------------------------
const compile = () => {
debug('Starting compiler.');

return Promise.resolve()
.then(() => webpackCompiler(webpackConfig))
.then(() => webpackCompiler())
.then(() => {
debug('Compilation completed successfully.');
})
Expand Down
4 changes: 2 additions & 2 deletions src/controller/middleware/rootReducer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// root Redux reducers for Splite-Chunks mode,
// probably you would always need this
import { combineReducers } from 'redux';
import { connectRouter } from 'connected-react-router';
import app from '../../modules/reducers';
import history from '../history';

// root Redux reducer
const makeRootReducer = asyncReducers => {
return combineReducers({
...asyncReducers,
Expand All @@ -13,6 +12,7 @@ const makeRootReducer = asyncReducers => {
});
};

// Splite-Chunks environment, probably you would always need this
export const injectReducer = (store, { key, reducer }) => {
if (Object.hasOwnProperty.call(store.asyncReducers, key)) return;
store.asyncReducers[key] = reducer;
Expand Down
5 changes: 4 additions & 1 deletion src/controller/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import history from './history';

import { logger, makeRootReducer, sagaMiddleware as saga, rootSaga, runSaga } from './middleware';

// creating the root store config
const rootStore = () => {
const middleware = [];

Expand All @@ -19,12 +20,13 @@ const rootStore = () => {

const enhancers = [];

// allow to use the redux browser plugin
if (__DEV__ && window.__REDUX_DEVTOOLS_EXTENSION__) {
enhancers.push(window.__REDUX_DEVTOOLS_EXTENSION__());
}

// ======================================================
// Store Instantiation and HMR Setup
// Store Instantiation
// ======================================================
const store = createStore(
makeRootReducer(),
Expand All @@ -35,6 +37,7 @@ const rootStore = () => {
)
);

// saga injecting during code-splitting
store.runSaga = runSaga;
runSaga(rootSaga);
store.asyncReducers = {};
Expand Down

0 comments on commit c18de36

Please sign in to comment.