mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
fix build env(redux devtools removed)
This commit is contained in:
28
lib/store.js
28
lib/store.js
@@ -1,26 +1,24 @@
|
|||||||
import reducer from './reducer'
|
import reducer from './reducer'
|
||||||
import { createStore } from 'redux'
|
import { createStore } from 'redux'
|
||||||
|
|
||||||
// import React from 'react'
|
// import React from 'react'
|
||||||
// import { compose } from 'redux'
|
// import { compose } from 'redux'
|
||||||
// import { devTools, persistState } from 'redux-devtools'
|
// import { devTools, persistState } from 'redux-devtools'
|
||||||
// import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'
|
// import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'
|
||||||
|
|
||||||
console.log(process.env)
|
// let finalCreateStore = compose(devTools(), persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)))(createStore)
|
||||||
|
// let store = finalCreateStore(reducer)
|
||||||
|
|
||||||
var store, devToolEl
|
// devToolEl = (
|
||||||
// if (process.env.NODE_ENV !== 'production') {
|
// <DebugPanel top right bottom>
|
||||||
// let finalCreateStore = compose(devTools(), persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/)))(createStore)
|
// <DevTools store={store} monitor={LogMonitor} visibleOnLoad={false}/>
|
||||||
// let store = finalCreateStore(reducer)
|
// </DebugPanel>
|
||||||
|
// )
|
||||||
|
|
||||||
// devToolEl = (
|
// export let devToolElement = devToolEl
|
||||||
// <DebugPanel top right bottom>
|
// export default store
|
||||||
// <DevTools store={store} monitor={LogMonitor} visibleOnLoad={false}/>
|
|
||||||
// </DebugPanel>
|
|
||||||
// )
|
|
||||||
// } else {
|
|
||||||
// }
|
|
||||||
devToolEl = null
|
|
||||||
store = createStore(reducer)
|
|
||||||
|
|
||||||
export let devToolElement = devToolEl
|
let store = createStore(reducer)
|
||||||
|
|
||||||
|
export let devToolElement = null
|
||||||
export default store
|
export default store
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "boost",
|
"name": "boost",
|
||||||
"version": "0.4.0-alpha",
|
"version": "0.4.0-alpha.1",
|
||||||
"description": "Boost App",
|
"description": "Boost App",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron ./main.js",
|
"start": "electron ./main.js",
|
||||||
"webpack": "webpack-dev-server --inline",
|
"webpack": "webpack-dev-server --inline --config webpack.config.js",
|
||||||
"compile": "NODE_ENV=production webpack --config webpack.config.production.js",
|
"compile": "NODE_ENV=production webpack --config webpack.config.production.js -p",
|
||||||
"build": "electron-packager ./ Boost $npm_package_config_platform $npm_package_config_version $npm_package_config_ignore --overwrite",
|
"build": "electron-packager ./ Boost $npm_package_config_platform $npm_package_config_version $npm_package_config_ignore --overwrite",
|
||||||
"codesign": "codesign --verbose --deep --force --sign \"MAISIN solutions Inc.\" Boost-darwin-x64/Boost.app"
|
"codesign": "codesign --verbose --deep --force --sign \"MAISIN solutions Inc.\" Boost-darwin-x64/Boost.app"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ module.exports = {
|
|||||||
'redbox-react',
|
'redbox-react',
|
||||||
'react-transform-hmr',
|
'react-transform-hmr',
|
||||||
'react-transform-catch-errors',
|
'react-transform-catch-errors',
|
||||||
'redux-devtools',
|
|
||||||
'redux-devtools/lib/react',
|
|
||||||
'react-select',
|
'react-select',
|
||||||
'markdown-it',
|
'markdown-it',
|
||||||
'moment'
|
'moment'
|
||||||
|
|||||||
@@ -29,8 +29,7 @@ module.exports = {
|
|||||||
new webpack.optimize.OccurenceOrderPlugin(),
|
new webpack.optimize.OccurenceOrderPlugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
'NODE_ENV': JSON.stringify('production'),
|
'NODE_ENV': JSON.stringify('production')
|
||||||
'BABEL_ENV': JSON.stringify('production')
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// new webpack.optimize.UglifyJsPlugin({
|
// new webpack.optimize.UglifyJsPlugin({
|
||||||
@@ -44,17 +43,12 @@ module.exports = {
|
|||||||
'md5',
|
'md5',
|
||||||
'superagent',
|
'superagent',
|
||||||
'superagent-promise',
|
'superagent-promise',
|
||||||
// 'react',
|
'react',
|
||||||
// 'redux',
|
'redux',
|
||||||
// 'react-redux',
|
'react-redux',
|
||||||
// 'react-router',
|
'react-router',
|
||||||
'lodash',
|
'lodash',
|
||||||
// 'redbox-react',
|
'react-select',
|
||||||
// 'react-transform-hmr',
|
|
||||||
// 'react-transform-catch-errors',
|
|
||||||
// 'redux-devtools',
|
|
||||||
// 'redux-devtools/lib/react',
|
|
||||||
// 'react-select',
|
|
||||||
'markdown-it',
|
'markdown-it',
|
||||||
'moment',
|
'moment',
|
||||||
'fs',
|
'fs',
|
||||||
|
|||||||
Reference in New Issue
Block a user