mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
e9b87686e1
* Upgrade electron-builder * Fix optional dep * Add another dep * Fix travis * Fix 7zip install * Fix icons * Minor fix * Delete changelog * Moved build scripts to JS * Some adjustments * Remove lines * Add 7zip back * Update scripts * Small tweaks * Fix electronbuilder config * snap dependency * Fix pkg * Remove snapd dep * Updated deps and lots of fixes * Travis update * Return package name * Remove snap for now * Remove portable * Try fixing code signing * Bump cache * Disable automatic tests * Fix windows artifacts * package-lock for app/ * Try fix npm install * Try again * Some minor tweaks * Preleases by default
26 lines
801 B
JavaScript
26 lines
801 B
JavaScript
import {createStore, applyMiddleware, compose} from 'redux';
|
||
import thunkMiddleware from 'redux-thunk';
|
||
import {reducer} from './modules';
|
||
|
||
export default function () {
|
||
const composeEnhancers =
|
||
typeof window === 'object' &&
|
||
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
|
||
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
|
||
// Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
|
||
}) : compose;
|
||
const middleware = [thunkMiddleware];
|
||
const enhancer = composeEnhancers(
|
||
applyMiddleware(...middleware)
|
||
// other store enhancers if any
|
||
);
|
||
const store = createStore(reducer, enhancer);
|
||
if (__DEV__ && module.hot) {
|
||
module.hot.accept('./modules/index', () => {
|
||
store.replaceReducer(reducer);
|
||
});
|
||
}
|
||
|
||
return store;
|
||
}
|