electronup 0.0.5 → 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/client/index.d.ts +67 -61
- package/dist/client/index.js +0 -12
- package/dist/client/index.mjs +0 -5
- package/package.json +1 -1
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))
|
|
@@ -19,12 +15,4 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
15
|
|
|
20
16
|
// index.ts
|
|
21
17
|
var electronup_exports = {};
|
|
22
|
-
__export(electronup_exports, {
|
|
23
|
-
defineConfig: () => defineConfig
|
|
24
|
-
});
|
|
25
18
|
module.exports = __toCommonJS(electronup_exports);
|
|
26
|
-
var defineConfig = (config) => config;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
defineConfig
|
|
30
|
-
});
|
package/dist/client/index.mjs
CHANGED