electronup 0.0.7 → 0.0.8

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.
@@ -0,0 +1,71 @@
1
+ import { Configuration } from 'electron-builder';
2
+ import { UserConfig } from 'vite';
3
+ import { Options } from 'tsup';
4
+
5
+ interface ViteConfig extends Omit<UserConfig, 'publicDir' | 'ssr'> { }
6
+
7
+ interface TsupConfig {
8
+ external?: (string | RegExp)[];
9
+ noExternal?: (string | RegExp)[];
10
+ }
11
+
12
+ interface BuilderConfig extends Configuration { }
13
+
14
+ interface ElectronupConfig {
15
+ viteConfig?: ViteConfig
16
+ tsupConfig?: TsupConfig
17
+ preloadTsup?: Options | Options[]
18
+ builderConfig: BuilderConfig
19
+
20
+ /**
21
+ * 渲染进程入口目录
22
+ * @default 'render'
23
+ */
24
+ renderDir?: string
25
+
26
+ /**
27
+ * 主进程入口目录
28
+ * @default 'main'
29
+ */
30
+ mainDir?: string
31
+
32
+ /**
33
+ * 静态资源目录
34
+ * @default 'public'
35
+ */
36
+ publicDir?: string
37
+
38
+ /**
39
+ * 动态库目录
40
+ * @default 'lib'
41
+ */
42
+ libDir?: string
43
+
44
+ /**
45
+ * 资源构建输出目录
46
+ * @default 'dist'
47
+ */
48
+ resourceDir?: string
49
+
50
+ /**
51
+ * electron-builder 输出目录
52
+ * @default 'out'
53
+ */
54
+ outDir?: string
55
+ }
56
+
57
+ interface ConfigEnv {
58
+ command: 'build' | 'serve'
59
+ root: string
60
+ }
61
+
62
+ type ElectronupConfigFnObject = (env: ConfigEnv) => ElectronupConfig;
63
+ type ElectronupConfigFnPromise = (env: ConfigEnv) => Promise<ElectronupConfig>;
64
+ type ElectronupConfigFn = (env: ConfigEnv) => ElectronupConfig | Promise<ElectronupConfig>;
65
+ type ElectronupConfigExport = ElectronupConfig | Promise<ElectronupConfig> | ElectronupConfigFnObject | ElectronupConfigFnPromise | ElectronupConfigFn;
66
+ declare function defineConfig(config: ElectronupConfig): ElectronupConfig;
67
+ declare function defineConfig(config: Promise<ElectronupConfig>): Promise<ElectronupConfig>;
68
+ declare function defineConfig(config: ElectronupConfigFnObject): ElectronupConfigFnObject;
69
+ declare function defineConfig(config: ElectronupConfigExport): ElectronupConfigExport;
70
+
71
+ export { BuilderConfig, ConfigEnv, ElectronupConfig, ElectronupConfigExport, ElectronupConfigFn, ElectronupConfigFnObject, ElectronupConfigFnPromise, TsupConfig, ViteConfig, defineConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electronup",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "融合构建 electron 应用需要的构建工具,保留原有配置习惯的命令行工具 ",
5
5
  "author": "quiteer",
6
6
  "license": "MIT",
@@ -38,25 +38,23 @@
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@types/node": ">= 16",
41
- "electron": ">= 20",
42
- "electron-builder": "^23.6.0",
43
41
  "node": ">= 16",
44
- "tsup": "^6.7.0",
45
- "vite": "^4.4.9",
46
42
  "vue": ">= 3"
47
43
  },
48
- "devDependencies": {
44
+ "dependencies": {
49
45
  "@quiteer/parser-config": "^1.0.3",
50
- "@types/inquirer": "^9.0.3",
51
46
  "cac": "^6.7.14",
52
47
  "dotenv": "^16.3.1",
53
- "electron": "^22.3.6",
54
- "electron-builder": "^23.6.0",
55
- "fs-extra": "^10.1.0",
56
- "inquirer": "8.2.5",
48
+ "electron": "^21.2.2",
49
+ "electron-builder": "^24.6.3",
50
+ "fs-extra": "^11.1.1",
51
+ "inquirer": "^9.2.10",
57
52
  "portfinder": "^1.0.32",
58
- "tsup": "^6.7.0",
53
+ "tsup": "^7.2.0",
59
54
  "vite": "^4.4.9",
60
55
  "yaml": "^2.3.1"
56
+ },
57
+ "devDependencies": {
58
+ "@types/inquirer": "^9.0.3"
61
59
  }
62
60
  }