张恒

添加部分文案,添加当生产模式时,禁用devTools,更新依赖

......@@ -24,7 +24,7 @@ else build()
function clean () {
del.sync(['build/*', '!build/icons', '!build/icons/icon.*'])
console.log(`\n${doneLog}\n`)
console.log(`\n${doneLog}clear done`)
process.exit()
}
......
......@@ -7,6 +7,7 @@ const { dependencies } = require('../package.json')
const webpack = require('webpack')
const MinifyPlugin = require("babel-minify-webpack-plugin");
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, '..', dir)
......@@ -53,7 +54,10 @@ let mainConfig = {
path: path.join(__dirname, '../dist/electron')
},
plugins: [
new webpack.NoEmitOnErrorsPlugin()
new webpack.NoEmitOnErrorsPlugin(),
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: resolve('dist/electron')
})
],
resolve: {
alias: {
......
......@@ -70,7 +70,7 @@
"vuex-electron": "^1.0.3"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.6.0",
"@babel/plugin-proposal-do-expressions": "^7.6.0",
......@@ -87,28 +87,29 @@
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.6.0",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/polyfill": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@babel/register": "^7.6.0",
"@babel/runtime": "^7.6.0",
"@babel/preset-env": "^7.6.2",
"@babel/register": "^7.6.2",
"@babel/runtime": "^7.6.2",
"ajv": "^6.10.2",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.6",
"babel-minify-webpack-plugin": "^0.3.1",
"cfonts": "^2.4.5",
"chalk": "^2.4.2",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.0.4",
"cross-env": "^5.2.1",
"cross-env": "^6.0.0",
"css-loader": "^3.1.0",
"del": "^5.0.0",
"electron": "^6.0.9",
"electron": "^6.0.10",
"electron-builder": "^21.2.0",
"electron-devtools-installer": "^2.2.4",
"eslint": "^6.4.0",
"eslint-config-standard": "^13.0.1",
"eslint-config-standard": "^14.1.0",
"eslint-friendly-formatter": "^4.0.1",
"eslint-loader": "^2.2.1",
"eslint-loader": "^3.0.0",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^9.2.0",
......
......@@ -4,7 +4,7 @@ import config from '@config'
import setIpc from './ipcMain'
import electronDevtoolsInstaller, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080` : `file://${__dirname}/index.html`
const winURL = process.env.NODE_ENV === 'development' ? 'http://localhost:9080' : `file://${__dirname}/index.html`
var loadWindow = null
var mainWindow = null
......@@ -16,12 +16,17 @@ function createMainWindow () {
height: 800,
useContentSize: true,
width: 1700,
minWidth: 1366,
show: false,
frame: config.IsUseSysTitle,
titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true,
webSecurity: false
webSecurity: false,
// 如果是开发模式可以使用devTools
devTools: process.env.NODE_ENV === 'development',
// 在macos中启用橡皮动画
scrollBounce: process.platform === 'darwin'
}
})
......