mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-18 00:37:36 +08:00
@@ -1,6 +1,6 @@
|
||||
import PicGoCore from '~/universal/types/picgo'
|
||||
import { dbChecker, dbPathChecker } from 'apis/core/datastore/dbChecker'
|
||||
import fs from 'fs-extra'
|
||||
import pkg from 'root/package.json'
|
||||
// eslint-disable-next-line
|
||||
const requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require
|
||||
const PicGo = requireFunc('picgo') as typeof PicGoCore
|
||||
@@ -15,6 +15,7 @@ picgo.saveConfig({
|
||||
PICGO_ENV: 'GUI'
|
||||
})
|
||||
|
||||
global.PICGO_GUI_VERSION = pkg.version
|
||||
picgo.GUI_VERSION = global.PICGO_GUI_VERSION
|
||||
|
||||
export default picgo! as PicGoCore
|
||||
|
||||
@@ -1,19 +1,12 @@
|
||||
import fs from 'fs-extra'
|
||||
import path from 'path'
|
||||
import os from 'os'
|
||||
import pkg from 'root/package.json'
|
||||
import { dbPathChecker } from 'apis/core/datastore/dbChecker'
|
||||
|
||||
const configPath = dbPathChecker()
|
||||
const CONFIG_DIR = path.dirname(configPath)
|
||||
|
||||
function injectPicGoVersion () {
|
||||
global.PICGO_GUI_VERSION = pkg.version
|
||||
global.PICGO_CORE_VERSION = pkg.dependencies.picgo.replace('^', '')
|
||||
}
|
||||
|
||||
function beforeOpen () {
|
||||
injectPicGoVersion()
|
||||
if (process.platform === 'darwin') {
|
||||
resolveMacWorkFlow()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user