create-electron-base 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,71 @@
1
- # Temporary Holding Version
1
+ # create-electron-base
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 生成一个 Electron 桌面项目。基础能力由 `@thirty-coder/electron-base-kit` 提供,脚手架只负责生成结构和配置。
4
+
5
+ ## 用法
6
+
7
+ ```bash
8
+ npx create-electron-base my-app
9
+ ```
10
+
11
+ 三轮提问:
12
+
13
+ 1. **基本信息**:项目名称、应用 ID、产品名称
14
+ 2. **框架能力**:自动更新、授权校验、系统托盘、系统通知、全局快捷键、文件对话框、剪贴板、开机自启、deep link
15
+ 3. **前端配套**:vue-router、pinia、ant-design-vue
16
+
17
+ 生成后:
18
+
19
+ ```bash
20
+ cd my-app
21
+ pnpm i
22
+ pnpm dev
23
+ ```
24
+
25
+ ## 生成后的结构
26
+
27
+ ```
28
+ my-app/
29
+ ├─ electron/ 主进程
30
+ │ ├─ main.ts 入口
31
+ │ ├─ preload.ts 预加载脚本
32
+ │ └─ modules/ 业务模块
33
+ ├─ renderer/ 渲染进程(Vue3 + TS)
34
+ │ ├─ main.ts
35
+ │ ├─ App.vue
36
+ │ ├─ bridge/ 封装 window.api
37
+ │ ├─ views/
38
+ │ ├─ components/
39
+ │ ├─ assets/
40
+ │ └─ styles/
41
+ ├─ shared/ 两侧共享的类型
42
+ ├─ scripts/ 打包加固
43
+ ├─ app.config.json 项目配置
44
+ ├─ electron-builder.yml 打包配置
45
+ ├─ vite.config.ts
46
+ └─ package.json
47
+ ```
48
+
49
+ 选了 vue-router 会多一个 `renderer/router/`,选了 pinia 会多一个 `renderer/stores/`。
50
+
51
+ 框架源码不在项目里,装在 `node_modules/@thirty-coder/electron-base-kit`。
52
+
53
+ `renderer/bridge/` 是渲染进程调用主进程能力的唯一入口,业务代码不直接写 `window.api`。
54
+
55
+ 写业务只动 `electron/modules/` 和 `renderer/`。
56
+
57
+ ## 常用命令
58
+
59
+ | 命令 | 作用 |
60
+ | --- | --- |
61
+ | `pnpm dev` | 启动开发环境,改代码自动重载 |
62
+ | `pnpm build` | 类型检查 + 打包当前平台 |
63
+ | `pnpm build:win` | 打 Windows 安装包(NSIS) |
64
+ | `pnpm build:mac` | 打 macOS 安装包(dmg) |
65
+ | `pnpm typecheck` | 只做类型检查 |
66
+
67
+ ## 相关
68
+
69
+ 能力清单、`app.config.json` 字段、升级方式,见 `@thirty-coder/electron-base-kit` 的 README。
70
+
71
+ 脚手架本身怎么改见 [MAINTAINING.md](./MAINTAINING.md)。
package/bin/index.mjs ADDED
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import { resolve } from 'node:path'
3
+ import { existsSync } from 'node:fs'
4
+ import { ask } from '../src/prompts.mjs'
5
+ import { generate } from '../src/generate.mjs'
6
+
7
+ const targetArg = process.argv[2]
8
+
9
+ async function main() {
10
+ const target = resolve(targetArg ?? 'my-app')
11
+
12
+ if (existsSync(target)) {
13
+ console.error(`目录已存在:${target}`)
14
+ process.exit(1)
15
+ }
16
+
17
+ const answers = await ask({ defaultName: targetArg ?? 'my-app' })
18
+ if (!answers) {
19
+ console.log('已取消')
20
+ process.exit(0)
21
+ }
22
+
23
+ await generate({ target, answers })
24
+
25
+ console.log(`\n项目已生成:${target}\n`)
26
+ console.log('接下来:')
27
+ console.log(` cd ${targetArg ?? 'my-app'}`)
28
+ console.log(' pnpm i')
29
+ console.log(' pnpm dev')
30
+ }
31
+
32
+ main().catch((err) => {
33
+ console.error(err)
34
+ process.exit(1)
35
+ })
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "create-electron-base",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "生成 Electron 桌面项目",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/sanshi26910/electron-base.git"
9
+ },
10
+ "type": "module",
11
+ "bin": {
12
+ "create-electron-base": "bin/index.mjs"
13
+ },
14
+ "files": [
15
+ "bin",
16
+ "src",
17
+ "templates"
18
+ ],
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "dependencies": {
23
+ "prompts": "^2.4.2"
24
+ }
25
+ }
@@ -0,0 +1,36 @@
1
+ /** 框架能力,写进 app.config.json 的 features */
2
+ export const capabilityOptions = [
3
+ { value: 'updater', title: '自动更新', description: 'Windows 静默更新,macOS 引导下载' },
4
+ { value: 'license', title: '授权校验', description: '非对称签名、离线验签' },
5
+ { value: 'tray', title: '系统托盘', description: '托盘图标、右键菜单、未读角标' },
6
+ { value: 'notify', title: '系统通知', description: '原生通知 + 点击回调' },
7
+ { value: 'shortcut', title: '全局快捷键', description: '注册/注销、冲突检测' },
8
+ { value: 'dialog', title: '文件对话框', description: '打开、保存、选目录' },
9
+ { value: 'clipboard', title: '剪贴板', description: '文本、图片读写' },
10
+ { value: 'autolaunch', title: '开机自启', description: '登录项注册' },
11
+ { value: 'deeplink', title: 'deep link', description: '协议注册与参数解析' },
12
+ ]
13
+
14
+ /** 默认勾选的能力(索引对应 capabilityOptions) */
15
+ export const defaultCapabilities = [0, 3, 5, 6]
16
+
17
+ /** 前端配套 */
18
+ export const frontendOptions = [
19
+ { value: 'router', title: 'vue-router', description: '多页面路由' },
20
+ { value: 'pinia', title: 'pinia', description: '状态管理' },
21
+ { value: 'antd', title: 'ant-design-vue', description: 'UI 组件库' },
22
+ ]
23
+
24
+ /** 前端配套对应的依赖 */
25
+ export const frontendDeps = {
26
+ router: { name: 'vue-router', version: '^4.4.0' },
27
+ pinia: { name: 'pinia', version: '^2.2.0' },
28
+ antd: { name: 'ant-design-vue', version: '^4.2.0' },
29
+ }
30
+
31
+ /** 未选中时整块删除的目录或文件 */
32
+ export const conditionalPaths = {
33
+ router: ['renderer/router'],
34
+ pinia: ['renderer/stores'],
35
+ antd: [],
36
+ }
@@ -0,0 +1,114 @@
1
+ import { cp, readFile, writeFile, rm, readdir } from 'node:fs/promises'
2
+ import { join, dirname, extname, basename } from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+ import { capabilityOptions, frontendDeps, conditionalPaths } from './features.mjs'
5
+
6
+ const here = dirname(fileURLToPath(import.meta.url))
7
+ const templatesDir = join(here, '..', 'templates', 'app')
8
+
9
+ const TEXT_EXT = new Set([
10
+ '.ts', '.js', '.mjs', '.cjs', '.json', '.vue',
11
+ '.html', '.css', '.yml', '.yaml', '.md', '.txt',
12
+ ])
13
+
14
+ async function walk(dir) {
15
+ const out = []
16
+ for (const entry of await readdir(dir, { withFileTypes: true })) {
17
+ const path = join(dir, entry.name)
18
+ if (entry.isDirectory()) out.push(...(await walk(path)))
19
+ else out.push(path)
20
+ }
21
+ return out
22
+ }
23
+
24
+ async function getKitVersion() {
25
+ try {
26
+ const res = await fetch('https://registry.npmjs.org/@thirty-coder/electron-base-kit/latest')
27
+ if (!res.ok) throw new Error('registry 返回异常')
28
+ const data = await res.json()
29
+ return `^${data.version}`
30
+ } catch {
31
+ console.warn('查不到 kit 最新版本,使用 ^0.1.0')
32
+ return '^0.1.0'
33
+ }
34
+ }
35
+
36
+ /** 按选择保留或删除 #if / #if ! 块 */
37
+ function stripBlocks(content, enabled) {
38
+ return content.replace(
39
+ /^[^\n]*#if (!?)([a-z]+)[^\n]*\n([\s\S]*?)^[^\n]*#endif[^\n]*\n/gm,
40
+ (_, neg, name, body) => {
41
+ const on = enabled.includes(name)
42
+ return (neg ? !on : on) ? body : ''
43
+ },
44
+ )
45
+ }
46
+
47
+ export async function generate({ target, answers }) {
48
+ const kitVersion = await getKitVersion()
49
+ const enabled = [...answers.capabilities, ...answers.frontend]
50
+
51
+ await cp(templatesDir, target, { recursive: true })
52
+
53
+ for (const file of await walk(target)) {
54
+ const ext = extname(file)
55
+ const name = basename(file)
56
+ const isText = TEXT_EXT.has(ext) || name.startsWith('_') || file.endsWith('.tpl')
57
+ if (!isText) continue
58
+
59
+ let content = await readFile(file, 'utf8')
60
+ content = stripBlocks(content, enabled)
61
+ content = content
62
+ .replaceAll('{{projectName}}', answers.name)
63
+ .replaceAll('{{appId}}', answers.appId)
64
+ .replaceAll('{{productName}}', answers.productName)
65
+ .replaceAll('{{kitVersion}}', kitVersion)
66
+
67
+ let outPath = file
68
+ if (file.endsWith('.tpl')) outPath = file.slice(0, -4)
69
+ if (name.startsWith('_')) outPath = join(dirname(file), `.${name.slice(1)}`)
70
+
71
+ await writeFile(outPath, content)
72
+ if (outPath !== file) await rm(file)
73
+ }
74
+
75
+ // 未选中的配套,删掉整块目录
76
+ for (const [key, paths] of Object.entries(conditionalPaths)) {
77
+ if (enabled.includes(key)) continue
78
+ for (const rel of paths) {
79
+ await rm(join(target, rel), { recursive: true, force: true })
80
+ }
81
+ }
82
+
83
+ // app.config.json:能力开关按选择生成
84
+ const features = {}
85
+ for (const option of capabilityOptions) {
86
+ features[option.value] = answers.capabilities.includes(option.value)
87
+ }
88
+
89
+ const config = {
90
+ appId: answers.appId,
91
+ productName: answers.productName,
92
+ protocol: answers.name.replace(/-/g, ''),
93
+ features,
94
+ update: { provider: 'generic', url: '' },
95
+ license: { publicKey: '' },
96
+ window: { width: 1200, height: 800, minWidth: 900, minHeight: 600 },
97
+ }
98
+
99
+ await writeFile(
100
+ join(target, 'app.config.json'),
101
+ JSON.stringify(config, null, 2) + '\n',
102
+ )
103
+
104
+ // package.json:补前端依赖
105
+ const pkgPath = join(target, 'package.json')
106
+ const pkg = JSON.parse(await readFile(pkgPath, 'utf8'))
107
+
108
+ for (const key of answers.frontend) {
109
+ const dep = frontendDeps[key]
110
+ if (dep) pkg.dependencies[dep.name] = dep.version
111
+ }
112
+
113
+ await writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n')
114
+ }
@@ -0,0 +1,49 @@
1
+ import prompts from 'prompts'
2
+ import { capabilityOptions, defaultCapabilities, frontendOptions } from './features.mjs'
3
+
4
+ export async function ask({ defaultName }) {
5
+ const response = await prompts(
6
+ [
7
+ {
8
+ type: 'text',
9
+ name: 'name',
10
+ message: '项目名称',
11
+ initial: defaultName,
12
+ validate: (v) => (/^[a-z0-9-]+$/.test(v) ? true : '只能用小写字母、数字和连字符'),
13
+ },
14
+ {
15
+ type: 'text',
16
+ name: 'appId',
17
+ message: '应用 ID',
18
+ initial: (prev) => `com.example.${prev}`,
19
+ },
20
+ {
21
+ type: 'text',
22
+ name: 'productName',
23
+ message: '产品名称',
24
+ initial: (_, values) => values.name,
25
+ },
26
+ {
27
+ type: 'multiselect',
28
+ name: 'capabilities',
29
+ message: '需要哪些能力',
30
+ choices: capabilityOptions,
31
+ initial: defaultCapabilities,
32
+ instructions: false,
33
+ hint: '空格选择,回车确认',
34
+ },
35
+ {
36
+ type: 'multiselect',
37
+ name: 'frontend',
38
+ message: '前端配套',
39
+ choices: frontendOptions,
40
+ instructions: false,
41
+ hint: '空格选择,回车确认',
42
+ },
43
+ ],
44
+ { onCancel: () => false },
45
+ )
46
+
47
+ if (!response.name) return null
48
+ return response
49
+ }
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ out
3
+ release
4
+ dist
5
+ .DS_Store
6
+ *.log
@@ -0,0 +1 @@
1
+ electron_mirror=https://npmmirror.com/mirrors/electron/
@@ -0,0 +1,42 @@
1
+ import { app, BrowserWindow, ipcMain } from 'electron'
2
+ import { join } from 'node:path'
3
+ import { bootstrap } from '@thirty-coder/electron-base-kit'
4
+ import type { AppConfig } from '@thirty-coder/electron-base-kit'
5
+ import config from '../app.config.json'
6
+
7
+ function createWindow() {
8
+ const win = new BrowserWindow({
9
+ width: config.window.width,
10
+ height: config.window.height,
11
+ minWidth: config.window.minWidth,
12
+ minHeight: config.window.minHeight,
13
+ webPreferences: {
14
+ preload: join(__dirname, '../preload/preload.js'),
15
+ contextIsolation: true,
16
+ nodeIntegration: false,
17
+ sandbox: true,
18
+ },
19
+ })
20
+
21
+ if (process.env.ELECTRON_RENDERER_URL) {
22
+ win.loadURL(process.env.ELECTRON_RENDERER_URL)
23
+ } else {
24
+ win.loadFile(join(__dirname, '../renderer/index.html'))
25
+ }
26
+ }
27
+
28
+ app.whenReady().then(() => {
29
+ bootstrap(config as AppConfig)
30
+
31
+ ipcMain.handle('app:version', () => app.getVersion())
32
+
33
+ createWindow()
34
+
35
+ app.on('activate', () => {
36
+ if (BrowserWindow.getAllWindows().length === 0) createWindow()
37
+ })
38
+ })
39
+
40
+ app.on('window-all-closed', () => {
41
+ if (process.platform !== 'darwin') app.quit()
42
+ })
@@ -0,0 +1,2 @@
1
+ // 业务模块。每个功能一个文件,在 main.ts 里按需引入。
2
+ export {}
@@ -0,0 +1,10 @@
1
+ import { contextBridge, ipcRenderer } from 'electron'
2
+ import type { WindowApi } from '../shared/types'
3
+
4
+ const api: WindowApi = {
5
+ app: {
6
+ getVersion: () => ipcRenderer.invoke('app:version'),
7
+ },
8
+ }
9
+
10
+ contextBridge.exposeInMainWorld('api', api)
@@ -0,0 +1,21 @@
1
+ appId: {{appId}}
2
+ productName: {{productName}}
3
+ directories:
4
+ output: release
5
+ files:
6
+ - out/**/*
7
+ - package.json
8
+ asar: true
9
+ electronFuses:
10
+ runAsNode: false
11
+ enableNodeOptionsEnvironmentVariable: false
12
+ enableNodeCliInspectArguments: false
13
+ onlyLoadAppFromAsar: true
14
+ win:
15
+ target: nsis
16
+ nsis:
17
+ oneClick: false
18
+ allowToChangeInstallationDirectory: true
19
+ mac:
20
+ target: dmg
21
+ category: public.app-category.productivity
@@ -0,0 +1,38 @@
1
+ import { resolve } from 'node:path'
2
+ import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
3
+ import vue from '@vitejs/plugin-vue'
4
+
5
+ export default defineConfig({
6
+ main: {
7
+ plugins: [externalizeDepsPlugin()],
8
+ build: {
9
+ rollupOptions: {
10
+ input: { main: resolve(__dirname, 'electron/main.ts') },
11
+ },
12
+ },
13
+ },
14
+ preload: {
15
+ plugins: [externalizeDepsPlugin()],
16
+ build: {
17
+ rollupOptions: {
18
+ input: { preload: resolve(__dirname, 'electron/preload.ts') },
19
+ },
20
+ },
21
+ },
22
+ renderer: {
23
+ root: resolve(__dirname, 'renderer'),
24
+ resolve: {
25
+ alias: {
26
+ '@': resolve(__dirname, 'renderer'),
27
+ '@shared': resolve(__dirname, 'shared'),
28
+ },
29
+ },
30
+ build: {
31
+ sourcemap: false,
32
+ rollupOptions: {
33
+ input: { index: resolve(__dirname, 'renderer/index.html') },
34
+ },
35
+ },
36
+ plugins: [vue()],
37
+ },
38
+ })
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "{{projectName}}",
3
+ "version": "0.1.0",
4
+ "description": "",
5
+ "main": "./out/main/main.js",
6
+ "license": "MIT",
7
+ "scripts": {
8
+ "dev": "electron-vite dev",
9
+ "build": "npm run typecheck && electron-vite build",
10
+ "build:win": "npm run build && electron-builder --win",
11
+ "build:mac": "npm run build && electron-builder --mac",
12
+ "typecheck": "vue-tsc --noEmit -p tsconfig.json"
13
+ },
14
+ "dependencies": {
15
+ "@thirty-coder/electron-base-kit": "{{kitVersion}}",
16
+ "vue": "^3.5.47"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^22.10.0",
20
+ "@vitejs/plugin-vue": "^6.1.1",
21
+ "electron": "^45.6.0",
22
+ "electron-builder": "^26.18.0",
23
+ "electron-vite": "^6.0.0",
24
+ "typescript": "^6.0.3",
25
+ "vite": "^8.4.1",
26
+ "vue-tsc": "^3.3.14"
27
+ },
28
+ "pnpm": {
29
+ "onlyBuiltDependencies": ["electron"]
30
+ }
31
+ }
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div class="app">
3
+ <AppHeader />
4
+ <main class="app-main">
5
+ <!-- #if router -->
6
+ <RouterView />
7
+ <!-- #endif -->
8
+ <!-- #if !router -->
9
+ <Home />
10
+ <!-- #endif -->
11
+ </main>
12
+ </div>
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ import AppHeader from './components/AppHeader.vue'
17
+ // #if !router
18
+ import Home from './views/Home.vue'
19
+ // #endif
20
+ </script>
21
+
22
+ <style scoped>
23
+ .app {
24
+ display: flex;
25
+ flex-direction: column;
26
+ height: 100vh;
27
+ }
28
+
29
+ .app-main {
30
+ flex: 1;
31
+ overflow: auto;
32
+ padding: 24px;
33
+ }
34
+ </style>
@@ -0,0 +1,3 @@
1
+ /** 渲染进程调用主进程能力的唯一入口,业务代码不直接写 window.api */
2
+
3
+ export const getVersion = (): Promise<string> => window.api.app.getVersion()
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <header class="header">
3
+ <span class="title">{{productName}}</span>
4
+ </header>
5
+ </template>
6
+
7
+ <script setup lang="ts"></script>
8
+
9
+ <style scoped>
10
+ .header {
11
+ display: flex;
12
+ align-items: center;
13
+ height: 48px;
14
+ padding: 0 24px;
15
+ border-bottom: 1px solid #eee;
16
+ }
17
+
18
+ .title {
19
+ font-weight: 600;
20
+ }
21
+ </style>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>{{productName}}</title>
6
+ </head>
7
+ <body>
8
+ <div id="app"></div>
9
+ <script type="module" src="./main.ts"></script>
10
+ </body>
11
+ </html>
@@ -0,0 +1,27 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import './styles/main.css'
4
+ // #if antd
5
+ import Antd from 'ant-design-vue'
6
+ import 'ant-design-vue/dist/reset.css'
7
+ // #endif
8
+ // #if router
9
+ import router from './router'
10
+ // #endif
11
+ // #if pinia
12
+ import { createPinia } from 'pinia'
13
+ // #endif
14
+
15
+ const app = createApp(App)
16
+
17
+ // #if antd
18
+ app.use(Antd)
19
+ // #endif
20
+ // #if router
21
+ app.use(router)
22
+ // #endif
23
+ // #if pinia
24
+ app.use(createPinia())
25
+ // #endif
26
+
27
+ app.mount('#app')
@@ -0,0 +1,7 @@
1
+ import { createRouter, createWebHashHistory } from 'vue-router'
2
+ import Home from '@/views/Home.vue'
3
+
4
+ export default createRouter({
5
+ history: createWebHashHistory(),
6
+ routes: [{ path: '/', name: 'home', component: Home }],
7
+ })
@@ -0,0 +1,12 @@
1
+ import { defineStore } from 'pinia'
2
+
3
+ export const useAppStore = defineStore('app', {
4
+ state: () => ({
5
+ count: 0,
6
+ }),
7
+ actions: {
8
+ increment() {
9
+ this.count++
10
+ },
11
+ },
12
+ })
@@ -0,0 +1,15 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ body {
6
+ margin: 0;
7
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
8
+ 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
9
+ color: #1f1f1f;
10
+ background: #fff;
11
+ }
12
+
13
+ #app {
14
+ height: 100vh;
15
+ }
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <section class="home">
3
+ <h1>{{productName}}</h1>
4
+ <p class="version">electron-base-kit {{ version }}</p>
5
+ </section>
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import { ref, onMounted } from 'vue'
10
+ import { getVersion } from '../bridge'
11
+
12
+ const version = ref('读取中')
13
+
14
+ onMounted(async () => {
15
+ version.value = await getVersion()
16
+ })
17
+ </script>
18
+
19
+ <style scoped>
20
+ .home h1 {
21
+ margin: 0 0 8px;
22
+ font-size: 20px;
23
+ }
24
+
25
+ .version {
26
+ color: #888;
27
+ font-size: 13px;
28
+ }
29
+ </style>
@@ -0,0 +1,3 @@
1
+ // 打包加固:bytenode 编译主进程,fuses 和混淆在 electron-builder.yml
2
+ // 与 electron.vite.config.ts 里配置。
3
+ // 骨架阶段未实现,等对应能力落地后接入。
@@ -0,0 +1,13 @@
1
+ /** 主进程与渲染进程共享的类型 */
2
+
3
+ export interface WindowApi {
4
+ app: {
5
+ getVersion(): Promise<string>
6
+ }
7
+ }
8
+
9
+ declare global {
10
+ interface Window {
11
+ api: WindowApi
12
+ }
13
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "strict": true,
8
+ "jsx": "preserve",
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "noEmit": true,
14
+ "baseUrl": ".",
15
+ "paths": {
16
+ "@/*": ["renderer/*"],
17
+ "@shared/*": ["shared/*"]
18
+ },
19
+ "types": ["node"]
20
+ },
21
+ "include": [
22
+ "electron/**/*.ts",
23
+ "renderer/**/*.ts",
24
+ "renderer/**/*.vue",
25
+ "shared/**/*.ts",
26
+ "electron.vite.config.ts"
27
+ ],
28
+ "exclude": ["node_modules", "out", "release"]
29
+ }