electronup 0.0.5 → 0.0.7

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.
@@ -2,66 +2,70 @@ import { Configuration } from 'electron-builder';
2
2
  import { UserConfig } from 'vite';
3
3
  import { Options } from 'tsup';
4
4
 
5
- type ViteConfig = Omit<UserConfig, 'publicDir'>
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 ElectronupConfigFn = (env: ConfigEnv) => ElectronupConfig | Promise<ElectronupConfig>
63
- type UserElectronupConfig = ElectronupConfig | ElectronupConfigFn
5
+ interface ViteConfig extends Omit<UserConfig, 'publicDir' | 'ssr'> { }
64
6
 
65
- declare const defineConfig: (config: UserElectronupConfig) => UserElectronupConfig;
7
+ interface TsupConfig {
8
+ external?: (string | RegExp)[];
9
+ noExternal?: (string | RegExp)[];
10
+ }
66
11
 
67
- export { BuilderConfig, ConfigEnv, ElectronupConfig, TsupConfig, ViteConfig, defineConfig };
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 };
@@ -23,7 +23,9 @@ __export(electronup_exports, {
23
23
  defineConfig: () => defineConfig
24
24
  });
25
25
  module.exports = __toCommonJS(electronup_exports);
26
- var defineConfig = (config) => config;
26
+ function defineConfig(config) {
27
+ return config;
28
+ }
27
29
  // Annotate the CommonJS export names for ESM import in node:
28
30
  0 && (module.exports = {
29
31
  defineConfig
@@ -1,5 +1,7 @@
1
1
  // index.ts
2
- var defineConfig = (config) => config;
2
+ function defineConfig(config) {
3
+ return config;
4
+ }
3
5
  export {
4
6
  defineConfig
5
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electronup",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "融合构建 electron 应用需要的构建工具,保留原有配置习惯的命令行工具 ",
5
5
  "author": "quiteer",
6
6
  "license": "MIT",
@@ -39,26 +39,24 @@
39
39
  "peerDependencies": {
40
40
  "@types/node": ">= 16",
41
41
  "electron": ">= 20",
42
- "node": ">= 16",
43
- "vue": ">= 3"
44
- },
45
- "dependencies": {
46
42
  "electron-builder": "^23.6.0",
43
+ "node": ">= 16",
47
44
  "tsup": "^6.7.0",
48
- "typescript": "^5.0.4",
49
- "vite": "^4.3.1"
45
+ "vite": "^4.4.9",
46
+ "vue": ">= 3"
50
47
  },
51
48
  "devDependencies": {
52
49
  "@quiteer/parser-config": "^1.0.3",
53
50
  "@types/inquirer": "^9.0.3",
54
- "@types/rimraf": "^3.0.2",
55
51
  "cac": "^6.7.14",
56
52
  "dotenv": "^16.3.1",
57
53
  "electron": "^22.3.6",
54
+ "electron-builder": "^23.6.0",
58
55
  "fs-extra": "^10.1.0",
59
56
  "inquirer": "8.2.5",
60
57
  "portfinder": "^1.0.32",
61
- "rimraf": "^3.0.2",
58
+ "tsup": "^6.7.0",
59
+ "vite": "^4.4.9",
62
60
  "yaml": "^2.3.1"
63
61
  }
64
62
  }