切换导航条
切换导航条
当前项目
正在载入...
登录
术习电报
/
electron-vue-template
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
作者
张恒
2019-09-24 09:59:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提交
70382696e5b9f396a3810d2006f9588d80f1e47c
70382696
1 个父辈
71f6fccd
添加部分文案,添加当生产模式时,禁用devTools,更新依赖
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
23 行增加
和
13 行删除
.electron-vue/build.js
.electron-vue/webpack.main.config.js
package-lock.json
package.json
src/main/services/windowManager.js
.electron-vue/build.js
查看文件 @
7038269
...
...
@@ -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
()
}
...
...
.electron-vue/webpack.main.config.js
查看文件 @
7038269
...
...
@@ -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
:
{
...
...
package-lock.json
查看文件 @
7038269
此文件的差异被折叠,
点击展开。
package.json
查看文件 @
7038269
...
...
@@ -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"
:
"^1
3.0.1
"
,
"eslint-config-standard"
:
"^1
4.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"
,
...
...
src/main/services/windowManager.js
查看文件 @
7038269
...
...
@@ -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'
}
})
...
...
请
注册
或
登录
后发表评论