Browse Source

重构了代码,主进程和渲染进程交互方式不变

develop
谢亚昕 6 days ago
parent
commit
9a5776d586
  1. 4
      electron.vite.config.ts
  2. 5
      packages/base/api/abstract.ts
  3. 0
      packages/base/api/browser.ts
  4. 2
      packages/base/api/electron.ts
  5. 5
      src/common/event/Snippet/hook.ts
  6. 18
      src/common/event/Snippet/index.ts
  7. 7
      src/common/readme.md
  8. 165
      src/main/App copy.ts
  9. 2
      src/main/_ioc.ts
  10. 0
      src/main/command/PlatForm/command.ts
  11. 0
      src/main/command/Setting/command.ts
  12. 0
      src/main/command/Snippet/command.ts
  13. 0
      src/main/command/Updater/command.ts
  14. 2
      src/main/command/_ioc.ts
  15. 0
      src/preload/plugin.ts
  16. 10
      src/renderer/auto-imports.d.ts
  17. 2
      src/renderer/src/composables/Api/Platform/_/index.ts
  18. 4
      src/renderer/src/composables/Api/Platform/useApiPlatForm.ts
  19. 2
      src/renderer/src/composables/Api/Setting/_/index.ts
  20. 4
      src/renderer/src/composables/Api/Setting/useApiSetting.ts
  21. 2
      src/renderer/src/composables/Api/Updater/_/index.ts
  22. 22
      src/renderer/src/composables/Api/Updater/useApiUpdater.ts
  23. 3
      src/renderer/src/composables/useTest.ts
  24. 48
      src/renderer/src/pages/index/index copy.vue
  25. 7
      src/renderer/src/pages/index/index.vue
  26. 5
      src/renderer/src/pages/setting/index.vue
  27. 4
      src/renderer/src/ui/NavBar.vue
  28. 16
      src/renderer/src/ui/Update.vue
  29. 10
      tsconfig.node.json
  30. 7
      tsconfig.web.json

4
electron.vite.config.ts

@ -31,7 +31,7 @@ export default defineConfig({
lib: {
entry: {
index: resolve(__dirname, "./src/preload/index.ts"),
plugin: resolve(__dirname, "./src/preload/plugin.ts"),
// plugin: resolve(__dirname, "./src/preload/plugin.ts"),
},
},
},
@ -101,7 +101,7 @@ export default defineConfig({
"vue-i18n",
],
dts: true,
dirs: ["src/composables"],
dirs: ["src/composables/**/*.ts", "!src/composables/**/_/**/*.ts"],
vueTemplate: true,
}),
// https://github.com/antfu/vite-plugin-components

5
src/common/lib/abstract.ts → packages/base/api/abstract.ts

@ -1,5 +1,5 @@
import { ElectronApiClient } from "common/lib/electron"
import { BrowserApiClient } from "common/lib/browser"
import { ElectronApiClient } from "./electron"
import { BrowserApiClient } from "./browser"
import { BaseSingleton } from "base/index"
// 定义抽象 API 接口
@ -49,6 +49,7 @@ export class ApiFactory {
static getApiClient(): IApiClient {
if (this.instance instanceof NullApiClient) {
// 根据环境选择合适的 API 客户端
// @ts-ignore 忽略类型检查
if (window.api && window.electron) {
this.instance = new ElectronApiClient()
} else {

0
src/common/lib/browser.ts → packages/base/api/browser.ts

2
src/common/lib/electron.ts → packages/base/api/electron.ts

@ -1,3 +1,5 @@
// @ts-nocheck window.api 不需要检查
import { IApiClient } from "./abstract"
export class ElectronApiClient implements IApiClient {

5
src/common/event/Snippet/hook.ts

@ -1,5 +0,0 @@
import { Snippet } from "."
export function useSnippet() {
return Snippet.getInstance()
}

18
src/common/event/Snippet/index.ts

@ -1,18 +0,0 @@
import { BaseSingleton } from "base"
import { ApiFactory } from "common/lib/abstract"
class Snippet extends BaseSingleton {
constructor() {
super()
}
private get api() {
return ApiFactory.getApiClient()
}
getTree = async () => {
return this.api.call("SnippetCommand.getTree")
}
}
export { Snippet }

7
src/common/readme.md

@ -1,7 +0,0 @@
## event
通用事件处理模块
- main/**/* 处理主进程的模块
- main/command.ts 会通过ioc收集,进入依赖管理中
- 其他 处理渲染进程的模块

165
src/main/App copy.ts

@ -1,165 +0,0 @@
import { inject, injectable } from "inversify"
// import Setting from "./modules/setting"
// import DB from "./modules/db"
import Api from "./modules/api"
import WindowManager from "./modules/window-manager"
import { app, nativeTheme, protocol, WebContentsView } from "electron"
import { electronApp } from "@electron-toolkit/utils"
// import Tabs from "./modules/tabs/Tabs"
import { getFileUrl } from "./utils"
import BaseClass from "./base/base"
protocol.registerSchemesAsPrivileged([
// {
// scheme: "http",
// privileges: { standard: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true },
// },
// {
// scheme: "https",
// privileges: { standard: true, bypassCSP: true, allowServiceWorkers: true, supportFetchAPI: true, corsEnabled: true, stream: true },
// },
// { scheme: "mailto", privileges: { standard: true } },
{
scheme: "api",
privileges: {
standard: true,
secure: true,
supportFetchAPI: true,
},
},
])
@injectable()
class App extends BaseClass {
destroy() {
// destroyAll()
// 这里是应用正常退出
}
// private _setting: Setting
// private _db: DB
private _Api: Api
private _windowManager: WindowManager
// private _tabs: Tabs
constructor(
// @inject(Setting) setting: Setting,
// @inject(DB) db: DB,
@inject(Api) Api: Api,
@inject(WindowManager) windowManager: WindowManager,
// @inject(Tabs) tabs: Tabs,
) {
super()
// this._setting = setting
// this._db = db
this._Api = Api
this._windowManager = windowManager
// this._tabs = tabs
}
async init() {
this._windowManager.init()
app.whenReady().then(() => {
electronApp.setAppUserModelId("top.xieyaxin")
this.create()
this._Api.init()
})
app.on("window-all-closed", () => {
if (process.platform !== "darwin") {
app.quit()
}
})
app.on("will-quit", () => {
this.destroy()
})
}
create() {
this._windowManager.showMainWindow()
const mainWindow = this._windowManager.getMainWindow()
if (mainWindow) {
nativeTheme.themeSource = "light"
mainWindow.setTitleBarOverlay({
height: 29, // the smallest size of the title bar on windows accounting for the border on windows 11
color: "#F8F8F8",
symbolColor: "#000000",
})
this._windowManager.showWindow("main-top")
const mainTopWindow = this._windowManager.get("main-top")
setTimeout(() => {
// console.log(mainWindow.getParentWindow());
setTimeout(() => {
mainWindow.contentView.children.length = 0
const view = new WebContentsView()
view.addChildView(mainTopWindow!.contentView)
view.webContents.loadURL(getFileUrl("about.html"))
// mainTopWindow!.contentView.setBounds({ x: 0, y: 0, width: 100, height: 30 })
// view.setBounds({ x: 0, y: 0, width: 100, height: 30 })
mainWindow.contentView.addChildView(view)
// mainWindow.contentView.children.sort()
console.log(mainWindow.contentView.children)
}, 5000)
// mainWindow.webContents = mainTopWindow!.webContents
mainWindow.reload()
console.log(mainWindow.webContents.getURL())
// mainTopWindow?.destroy()
// mainWindow.contentView.addChildView(mainWindow.contentView)
console.log(`child count: `, mainWindow.contentView.children.length)
}, 2000)
// if (mainTopWindow) {
// mainTopWindow.setParentWindow(mainWindow)
// mainTopWindow.setIgnoreMouseEvents(true, { forward: false })
// const listenMove = () => {
// if (mainWindow && mainTopWindow) {
// const pos = mainWindow.getPosition()
// mainTopWindow.setPosition(pos[0], pos[1])
// }
// }
// mainWindow?.on("move", listenMove)
// const listenResize = () => {
// if (mainWindow && mainTopWindow) {
// const size = mainWindow.getSize()
// console.log(size)
// mainTopWindow.setSize(size[0], size[1])
// const pos = mainWindow.getPosition()
// mainTopWindow.setPosition(pos[0], pos[1])
// }
// }
// listenResize()
// mainWindow?.on("resize", listenResize)
// }
}
// 考虑双browserwindow模式
/**
* browserwindow可以设置穿透tab放在底层window上window上
*/
// const webContentsView = new WebContentsView({
// webPreferences: {
// preload: join(__dirname, "../preload/index.mjs"),
// transparent: true,
// nodeIntegration: true,
// spellcheck: false,
// contextIsolation: true,
// },
// })
// // mainWindow!.contentView = webContentsView
// // setTimeout(() => {
// mainWindow!.contentView.addChildView(webContentsView)
// // mainWindow?.setIgnoreMouseEvents(true, { forward: true })
// // }, 2000);
// webContentsView.webContents.loadURL(getFileUrl("index.html"))
// const listenResize = () => {
// const size = mainWindow!.getSize()
// webContentsView.setBounds({ x: 0, y: 0, width: size[0], height: size[1] })
// }
// listenResize()
// mainWindow!.addListener("resize", listenResize)
// this._tabs.add("https://baidu.com", true)
// this._tabs.add("https://zhihu.com")
return mainWindow
}
}
export default App
export { App }

2
src/main/_ioc.ts

@ -2,7 +2,7 @@ import IOC from "./_iocClass"
import { Container } from "inversify"
import iocModules, { destroyAllModules } from "./modules/_ioc"
import iocController, { destroyAllController } from "./controller/_ioc"
import iocCommand, { destroyAllCommand } from "common/_ioc.main"
import iocCommand, { destroyAllCommand } from "./command/_ioc"
import App from "./App"
async function destroyAll() {

0
src/common/event/PlatForm/main/command.ts → src/main/command/PlatForm/command.ts

0
src/common/event/Setting/main/command.ts → src/main/command/Setting/command.ts

0
src/common/event/Snippet/main/command.ts → src/main/command/Snippet/command.ts

0
src/common/event/Updater/main/command.ts → src/main/command/Updater/command.ts

2
src/common/_ioc.main.ts → src/main/command/_ioc.ts

@ -6,7 +6,7 @@ const logger = _logger.createNamespace("command")
/**
*
*/
const commandModules = import.meta.glob("./event/**/main/command.{ts,js}", { eager: true })
const commandModules = import.meta.glob("./**/command.{ts,js}", { eager: true })
const modules = new ContainerModule(bind => {
// 自动绑定所有命令类

0
src/preload/plugin.ts

10
src/renderer/auto-imports.d.ts

@ -6,6 +6,7 @@
// biome-ignore lint: disable
export {}
declare global {
const ApiUpdaterStatus: typeof import('./src/composables/Api/Updater/useApiUpdater')['ApiUpdaterStatus']
const EffectScope: typeof import('vue')['EffectScope']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
@ -111,6 +112,9 @@ declare global {
const until: typeof import('@vueuse/core')['until']
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
const useAnimate: typeof import('@vueuse/core')['useAnimate']
const useApiPlatForm: typeof import('./src/composables/Api/Platform/useApiPlatForm')['useApiPlatForm']
const useApiSetting: typeof import('./src/composables/Api/Setting/useApiSetting')['useApiSetting']
const useApiUpdater: typeof import('./src/composables/Api/Updater/useApiUpdater')['useApiUpdater']
const useArrayDifference: typeof import('@vueuse/core')['useArrayDifference']
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
@ -247,7 +251,6 @@ declare global {
const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRef: typeof import('vue')['useTemplateRef']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useTest: typeof import('./src/composables/useTest')['useTest']
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
@ -307,6 +310,7 @@ import { UnwrapRef } from 'vue'
declare module 'vue' {
interface GlobalComponents {}
interface ComponentCustomProperties {
readonly ApiUpdaterStatus: UnwrapRef<typeof import('./src/composables/Api/Updater/useApiUpdater')['ApiUpdaterStatus']>
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
@ -412,6 +416,9 @@ declare module 'vue' {
readonly until: UnwrapRef<typeof import('@vueuse/core')['until']>
readonly useActiveElement: UnwrapRef<typeof import('@vueuse/core')['useActiveElement']>
readonly useAnimate: UnwrapRef<typeof import('@vueuse/core')['useAnimate']>
readonly useApiPlatForm: UnwrapRef<typeof import('./src/composables/Api/Platform/useApiPlatForm')['useApiPlatForm']>
readonly useApiSetting: UnwrapRef<typeof import('./src/composables/Api/Setting/useApiSetting')['useApiSetting']>
readonly useApiUpdater: UnwrapRef<typeof import('./src/composables/Api/Updater/useApiUpdater')['useApiUpdater']>
readonly useArrayDifference: UnwrapRef<typeof import('@vueuse/core')['useArrayDifference']>
readonly useArrayEvery: UnwrapRef<typeof import('@vueuse/core')['useArrayEvery']>
readonly useArrayFilter: UnwrapRef<typeof import('@vueuse/core')['useArrayFilter']>
@ -548,7 +555,6 @@ declare module 'vue' {
readonly useSwipe: UnwrapRef<typeof import('@vueuse/core')['useSwipe']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly useTemplateRefsList: UnwrapRef<typeof import('@vueuse/core')['useTemplateRefsList']>
readonly useTest: UnwrapRef<typeof import('./src/composables/useTest')['useTest']>
readonly useTextDirection: UnwrapRef<typeof import('@vueuse/core')['useTextDirection']>
readonly useTextSelection: UnwrapRef<typeof import('@vueuse/core')['useTextSelection']>
readonly useTextareaAutosize: UnwrapRef<typeof import('@vueuse/core')['useTextareaAutosize']>

2
src/common/event/PlatForm/index.ts → src/renderer/src/composables/Api/Platform/_/index.ts

@ -1,4 +1,4 @@
import { ApiFactory } from "common/lib/abstract"
import { ApiFactory } from "base/api/abstract"
import { BaseSingleton } from "base"
import { LogLevel } from "packages/logger/common"

4
src/common/event/PlatForm/hook.ts → src/renderer/src/composables/Api/Platform/useApiPlatForm.ts

@ -1,7 +1,7 @@
import { LogLevel } from "logger/common"
import { PlatForm } from "."
import { PlatForm } from "./_"
export function usePlatForm() {
export function useApiPlatForm() {
const plat = PlatForm.getInstance<PlatForm>()
// 全屏状态

2
src/common/event/Setting/index.ts → src/renderer/src/composables/Api/Setting/_/index.ts

@ -1,4 +1,4 @@
import { ApiFactory } from "common/lib/abstract"
import { ApiFactory } from "base/api/abstract"
import { BaseSingleton } from "base"
import { IConfig } from "config"

4
src/common/event/Setting/hook.ts → src/renderer/src/composables/Api/Setting/useApiSetting.ts

@ -1,10 +1,10 @@
import { defineStore } from "pinia"
import { Setting } from "."
import { Setting } from "./_"
import type { IConfig } from "config"
let rawConfig: IConfig = Setting.getInstance().sync() as unknown as IConfig
export const useSettingStore = defineStore(
export const useApiSetting = defineStore(
"Setting",
() => {
const config = ref(JSON.parse(JSON.stringify(rawConfig)))

2
src/common/event/Updater/index.ts → src/renderer/src/composables/Api/Updater/_/index.ts

@ -1,4 +1,4 @@
import { BaseEvent } from "common/lib/abstract"
import { BaseEvent } from "base/api/abstract"
class Updater extends BaseEvent {
constructor() {

22
src/common/event/Updater/hook.ts → src/renderer/src/composables/Api/Updater/useApiUpdater.ts

@ -1,7 +1,7 @@
import { EventMaps, UpdaterCommand } from "helper/updater/common"
import { defineStore } from "pinia"
export const enum UpdaterStatus {
export const enum ApiUpdaterStatus {
Idle = "idle",
Checking = "checking",
StartChecking = "start-checking",
@ -11,10 +11,10 @@ export const enum UpdaterStatus {
Error = "error",
}
export const useUpdaterStore = defineStore(
export const useApiUpdater = defineStore(
"Updater",
() => {
const curStatus = ref(UpdaterStatus.Idle)
const curStatus = ref(ApiUpdaterStatus.Idle)
const speed = ref(0)
const percent = ref(0)
const all = ref(0)
@ -24,19 +24,19 @@ export const useUpdaterStore = defineStore(
const api = getApi<UpdaterCommand, EventMaps, "UpdaterCommand">()
api.on("error", (_, data) => {
curStatus.value = UpdaterStatus.Error
curStatus.value = ApiUpdaterStatus.Error
console.log(data)
})
api.on("update-not-available", () => {
curStatus.value = UpdaterStatus.UpdateNotAvailable
curStatus.value = ApiUpdaterStatus.UpdateNotAvailable
isNeedUpdate.value = false
})
api.on("update-available", () => {
curStatus.value = UpdaterStatus.UpdateAvailable
curStatus.value = ApiUpdaterStatus.UpdateAvailable
isNeedUpdate.value = true
})
api.on("update-progress", (_, data) => {
curStatus.value = UpdaterStatus.Downloading
curStatus.value = ApiUpdaterStatus.Downloading
speed.value = +(data.speed / 1000).toFixed(2) // Convert to KB/s
percent.value = data.percent
all.value = data.all
@ -44,7 +44,7 @@ export const useUpdaterStore = defineStore(
isNeedUpdate.value = false
})
api.on("checking-for-update", () => {
curStatus.value = UpdaterStatus.Checking
curStatus.value = ApiUpdaterStatus.Checking
})
if (import.meta.env.PROD) {
api.callLong("UpdaterCommand.checkForUpdates")
@ -57,9 +57,9 @@ export const useUpdaterStore = defineStore(
now: now,
isNeedUpdate,
checkForUpdates() {
if (curStatus.value === UpdaterStatus.Checking) return
if (curStatus.value === UpdaterStatus.Downloading) return
curStatus.value = UpdaterStatus.StartChecking
if (curStatus.value === ApiUpdaterStatus.Checking) return
if (curStatus.value === ApiUpdaterStatus.Downloading) return
curStatus.value = ApiUpdaterStatus.StartChecking
api.callLong("UpdaterCommand.checkForUpdates")
},
}

3
src/renderer/src/composables/useTest.ts

@ -1,3 +0,0 @@
export function useTest() {
console.log("test")
}

48
src/renderer/src/pages/index/index copy.vue

@ -1,34 +1,34 @@
<script setup lang="ts">
import { useSnippet } from "common/event/Snippet/hook"
definePage({
meta: {
home: true,
},
})
// import { useSnippet } from "common/event/Snippet/hook"
// definePage({
// meta: {
// home: true,
// },
// })
const { getTree } = useSnippet()
// const { getTree } = useSnippet()
const activeLeft = ref<number | null>(null)
function clickActive(e: any) {
const el = e.target as HTMLDivElement
const { x } = el.getBoundingClientRect()
const { width: parentWidth } = el.parentElement!.getBoundingClientRect()
const newLeft = +((x / parentWidth) * 100).toFixed(2)
if (newLeft === activeLeft.value) {
activeLeft.value = null
return
}
activeLeft.value = +((x / parentWidth) * 100).toFixed(2)
}
// const activeLeft = ref<number | null>(null)
// function clickActive(e: any) {
// const el = e.target as HTMLDivElement
// const { x } = el.getBoundingClientRect()
// const { width: parentWidth } = el.parentElement!.getBoundingClientRect()
// const newLeft = +((x / parentWidth) * 100).toFixed(2)
// if (newLeft === activeLeft.value) {
// activeLeft.value = null
// return
// }
// activeLeft.value = +((x / parentWidth) * 100).toFixed(2)
// }
async function click() {
console.log(await getTree())
}
// async function click() {
// console.log(await getTree())
// }
</script>
<template>
<div h-full flex>
<div border-r-coolGray-200 border-r-1 border-r-solid flex flex-col max-w-300px w="3/10">
<!-- <div border-r-coolGray-200 border-r-1 border-r-solid flex flex-col max-w-300px w="3/10">
<div class="list">
<div v-if="activeLeft !== null" class="active" :style="{ left: activeLeft + '%' }"></div>
<div class="item" @click="clickActive">
@ -51,7 +51,7 @@
<div @click="click">文件树</div>
</div>
<div max-w-300px w="3/10" border-r-coolGray-200 border-r-1 border-r-solid>文件树</div>
<div>aa</div>
<div>aa</div> -->
</div>
</template>

7
src/renderer/src/pages/index/index.vue

@ -1,7 +1,7 @@
<script setup lang="ts">
import { useUpdaterStore } from "common/event/Updater/hook"
// import { useUpdaterStore } from "common/event/Updater/hook"
const UpdaterStore = useUpdaterStore()
// const UpdaterStore = useUpdaterStore()
</script>
<template>
@ -16,7 +16,8 @@
</div>
</div>
<button class="button">Button</button>
<button @click="UpdaterStore.checkForUpdates()">更新</button>
<!-- <button @click="UpdaterStore.checkForUpdates()">更新</button> -->
<button @click="$router.push('/browser')">浏览器</button>
</div>
</div>
</template>

5
src/renderer/src/pages/setting/index.vue

@ -1,9 +1,6 @@
<script setup lang="ts">
import Simplebar from "simplebar-vue"
import { useSettingStore } from "common/event/Setting/hook"
const settingStore = useSettingStore()
console.log(settingStore.config)
const settingStore = useApiSetting()
</script>
<template>

4
src/renderer/src/ui/NavBar.vue

@ -45,11 +45,11 @@
import icon from "@res/icon.png"
import Config from "config"
import { PopupMenu } from "@/bridge/PopupMenu"
import { usePlatForm } from "common/event/PlatForm/hook"
// import { usePlatForm } from "common/event/PlatForm/hook"
import { LogLevel } from "logger/common"
import Update from "./Update.vue"
const PlatForm = usePlatForm()
const PlatForm = useApiPlatForm()
const router = useRouter()
const route = useRoute()

16
src/renderer/src/ui/Update.vue

@ -13,16 +13,16 @@
>
<icon-grommet-icons:update
v-if="
UpdaterStore.status === UpdaterStatus.StartChecking ||
UpdaterStore.status === UpdaterStatus.Checking ||
UpdaterStore.status === UpdaterStatus.UpdateAvailable
UpdaterStore.status === ApiUpdaterStatus.StartChecking ||
UpdaterStore.status === ApiUpdaterStatus.Checking ||
UpdaterStore.status === ApiUpdaterStatus.UpdateAvailable
"
:class="{ rotate: UpdaterStore.status === UpdaterStatus.Checking }"
:class="{ rotate: UpdaterStore.status === ApiUpdaterStatus.Checking }"
></icon-grommet-icons:update>
<icon-bxs:error v-if="UpdaterStore.status === UpdaterStatus.Error" title="更新失败" class="text-red-400"></icon-bxs:error>
<icon-bxs:error v-if="UpdaterStore.status === ApiUpdaterStatus.Error" title="更新失败" class="text-red-400"></icon-bxs:error>
</div>
<div
v-if="UpdaterStore.status === UpdaterStatus.Downloading"
v-if="UpdaterStore.status === ApiUpdaterStatus.Downloading"
class="progress"
style="font-size: 12px"
px-2
@ -38,9 +38,7 @@
</template>
<script lang="ts" setup>
import { UpdaterStatus, useUpdaterStore } from "common/event/Updater/hook"
const UpdaterStore = useUpdaterStore()
const UpdaterStore = useApiUpdater()
</script>
<style lang="scss" scoped>

10
tsconfig.node.json

@ -19,12 +19,7 @@
"packages/**/main.ts",
"packages/**/*.common.ts",
"packages/**/common.ts",
"packages/**/*",
"src/common/**/*.main.ts",
"src/common/**/main/**/*",
"src/common/**/main.ts",
"src/common/**/*.common.ts",
"src/common/**/common.ts"
"packages/**/*"
],
"exclude": [
"packages/**/renderer/**/*",
@ -54,9 +49,6 @@
"main/*": [
"src/main/*"
],
"common/*": [
"src/common/*"
],
"@res/*": [
"resources/*"
],

7
tsconfig.web.json

@ -13,7 +13,6 @@
"src/types/**/*",
"config/**/*",
"./typed-router.d.ts",
"src/common/**/*",
"packages/**/*",
"packages/**/renderer/**/*",
],
@ -26,9 +25,6 @@
"packages/**/main/**/*",
"packages/**/*.main.ts",
"packages/**/main.ts",
"src/common/**/main/**/*",
"src/common/**/*.main.ts",
"src/common/**/main.ts"
],
"vueCompilerOptions": {
"plugins": [
@ -56,9 +52,6 @@
"config/*": [
"config/*"
],
"common/*": [
"src/common/*"
],
"@/*": [
"src/renderer/src/*"
],

Loading…
Cancel
Save