mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-18 18:17:37 +08:00
Added: debug options for vscode debug
This commit is contained in:
@@ -24,4 +24,15 @@ require('electron').app.on('ready', () => {
|
||||
})
|
||||
|
||||
// Require `main` process to boot app
|
||||
if (process.env.DEBUG_ENV === 'debug') {
|
||||
require('babel-core/register')({
|
||||
'presets': [
|
||||
['env', {
|
||||
'targets': {
|
||||
'node': true
|
||||
}
|
||||
}]
|
||||
]
|
||||
})
|
||||
}
|
||||
require('./index')
|
||||
|
||||
@@ -13,6 +13,9 @@ import pkg from '../../package.json'
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
||||
}
|
||||
if (process.env.DEBUG_ENV === 'debug') {
|
||||
global.__static = require('path').join(__dirname, '../../static').replace(/\\/g, '\\\\')
|
||||
}
|
||||
|
||||
let window
|
||||
let settingWindow
|
||||
@@ -50,6 +53,7 @@ function createTray () {
|
||||
{
|
||||
label: '打开详细窗口',
|
||||
click () {
|
||||
console.log(1)
|
||||
if (settingWindow === null) {
|
||||
createSettingWindow()
|
||||
settingWindow.show()
|
||||
|
||||
Reference in New Issue
Block a user