electronup 0.0.4 → 0.0.6
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/dist/bin/electronup.js +50650 -37
- package/dist/client/index.d.ts +67 -61
- package/dist/client/index.js +3 -15
- package/dist/client/index.mjs +0 -5
- package/package.json +11 -16
package/dist/client/index.d.ts
CHANGED
|
@@ -1,67 +1,73 @@
|
|
|
1
1
|
import { Configuration } from 'electron-builder';
|
|
2
|
-
import { UserConfig } from 'vite';
|
|
2
|
+
import { UserConfig, PluginOption } from 'vite';
|
|
3
3
|
import { Options } from 'tsup';
|
|
4
4
|
|
|
5
|
-
type ViteConfig = Omit<UserConfig, 'publicDir'>
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
type ViteConfig = Omit<UserConfig, 'plugins' | 'publicDir'> & {
|
|
6
|
+
plugins?: PluginOption[]
|
|
7
|
+
}
|
|
64
8
|
|
|
65
|
-
|
|
9
|
+
interface TsupConfig {
|
|
10
|
+
external?: (string | RegExp)[];
|
|
11
|
+
noExternal?: (string | RegExp)[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface BuilderConfig extends Configuration { }
|
|
15
|
+
|
|
16
|
+
interface ElectronupConfig {
|
|
17
|
+
viteConfig?: ViteConfig
|
|
18
|
+
tsupConfig?: TsupConfig
|
|
19
|
+
preloadTsup?: Options | Options[]
|
|
20
|
+
builderConfig: BuilderConfig
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 渲染进程入口目录
|
|
24
|
+
* @default 'render'
|
|
25
|
+
*/
|
|
26
|
+
renderDir?: string
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 主进程入口目录
|
|
30
|
+
* @default 'main'
|
|
31
|
+
*/
|
|
32
|
+
mainDir?: string
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 静态资源目录
|
|
36
|
+
* @default 'public'
|
|
37
|
+
*/
|
|
38
|
+
publicDir?: string
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 动态库目录
|
|
42
|
+
* @default 'lib'
|
|
43
|
+
*/
|
|
44
|
+
libDir?: string
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* 资源构建输出目录
|
|
48
|
+
* @default 'dist'
|
|
49
|
+
*/
|
|
50
|
+
resourceDir?: string
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* electron-builder 输出目录
|
|
54
|
+
* @default 'out'
|
|
55
|
+
*/
|
|
56
|
+
outDir?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
interface ConfigEnv {
|
|
60
|
+
command: 'build' | 'serve'
|
|
61
|
+
root: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
type ElectronupConfigAsyncFn = (env: ConfigEnv) => Promise<ElectronupConfig>
|
|
66
|
+
type ElectronupConfigFn = (env: ConfigEnv) => ElectronupConfig
|
|
67
|
+
|
|
68
|
+
declare function defineConfig(config: ElectronupConfig): ElectronupConfig;
|
|
69
|
+
declare function defineConfig(config: Promise<ElectronupConfig>): Promise<ElectronupConfig>;
|
|
70
|
+
declare function defineConfig(config: ElectronupConfigFn): ElectronupConfigFn;
|
|
71
|
+
declare function defineConfig(config: ElectronupConfigAsyncFn): ElectronupConfigAsyncFn;
|
|
66
72
|
|
|
67
73
|
export { BuilderConfig, ConfigEnv, ElectronupConfig, TsupConfig, ViteConfig, defineConfig };
|
package/dist/client/index.js
CHANGED
|
@@ -3,10 +3,6 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
6
|
var __copyProps = (to, from, except, desc) => {
|
|
11
7
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
8
|
for (let key of __getOwnPropNames(from))
|
|
@@ -17,14 +13,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
13
|
};
|
|
18
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
15
|
|
|
20
|
-
//
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
defineConfig: () => defineConfig
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(src_exports);
|
|
26
|
-
var defineConfig = (config) => config;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
defineConfig
|
|
30
|
-
});
|
|
16
|
+
// index.ts
|
|
17
|
+
var electronup_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(electronup_exports);
|
package/dist/client/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electronup",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "融合构建 electron 应用需要的构建工具,保留原有配置习惯的命令行工具 ",
|
|
5
5
|
"author": "quiteer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,27 +43,22 @@
|
|
|
43
43
|
"vue": ">= 3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@quiteer/parser-config": "^1.0.3",
|
|
47
|
-
"cac": "^6.7.14",
|
|
48
|
-
"dotenv": "^16.0.3",
|
|
49
46
|
"electron-builder": "^23.6.0",
|
|
50
|
-
"fs-extra": "^10.1.0",
|
|
51
|
-
"inquirer": "8.2.5",
|
|
52
|
-
"portfinder": "^1.0.32",
|
|
53
|
-
"rimraf": "^3.0.2",
|
|
54
47
|
"tsup": "^6.7.0",
|
|
55
48
|
"typescript": "^5.0.4",
|
|
56
|
-
"vite": "^4.3.1"
|
|
57
|
-
"yaml": "^2.2.1"
|
|
49
|
+
"vite": "^4.3.1"
|
|
58
50
|
},
|
|
59
51
|
"devDependencies": {
|
|
60
|
-
"@quiteer/
|
|
61
|
-
"@quiteer/ts-config": "^0.0.6",
|
|
62
|
-
"@types/fs-extra": "^9.0.13",
|
|
52
|
+
"@quiteer/parser-config": "^1.0.3",
|
|
63
53
|
"@types/inquirer": "^9.0.3",
|
|
64
|
-
"@types/node": "^20.3.2",
|
|
65
54
|
"@types/rimraf": "^3.0.2",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
55
|
+
"cac": "^6.7.14",
|
|
56
|
+
"dotenv": "^16.3.1",
|
|
57
|
+
"electron": "^22.3.6",
|
|
58
|
+
"fs-extra": "^10.1.0",
|
|
59
|
+
"inquirer": "8.2.5",
|
|
60
|
+
"portfinder": "^1.0.32",
|
|
61
|
+
"rimraf": "^3.0.2",
|
|
62
|
+
"yaml": "^2.3.1"
|
|
68
63
|
}
|
|
69
64
|
}
|