electronup 0.0.6 → 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.
@@ -1,10 +1,8 @@
1
1
  import { Configuration } from 'electron-builder';
2
- import { UserConfig, PluginOption } from 'vite';
2
+ import { UserConfig } from 'vite';
3
3
  import { Options } from 'tsup';
4
4
 
5
- type ViteConfig = Omit<UserConfig, 'plugins' | 'publicDir'> & {
6
- plugins?: PluginOption[]
7
- }
5
+ interface ViteConfig extends Omit<UserConfig, 'publicDir' | 'ssr'> { }
8
6
 
9
7
  interface TsupConfig {
10
8
  external?: (string | RegExp)[];
@@ -61,13 +59,13 @@ interface ConfigEnv {
61
59
  root: string
62
60
  }
63
61
 
64
-
65
- type ElectronupConfigAsyncFn = (env: ConfigEnv) => Promise<ElectronupConfig>
66
- type ElectronupConfigFn = (env: ConfigEnv) => ElectronupConfig
67
-
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;
68
66
  declare function defineConfig(config: ElectronupConfig): ElectronupConfig;
69
67
  declare function defineConfig(config: Promise<ElectronupConfig>): Promise<ElectronupConfig>;
70
- declare function defineConfig(config: ElectronupConfigFn): ElectronupConfigFn;
71
- declare function defineConfig(config: ElectronupConfigAsyncFn): ElectronupConfigAsyncFn;
68
+ declare function defineConfig(config: ElectronupConfigFnObject): ElectronupConfigFnObject;
69
+ declare function defineConfig(config: ElectronupConfigExport): ElectronupConfigExport;
72
70
 
73
- export { BuilderConfig, ConfigEnv, ElectronupConfig, TsupConfig, ViteConfig, defineConfig };
71
+ export { BuilderConfig, ConfigEnv, ElectronupConfig, ElectronupConfigExport, ElectronupConfigFn, ElectronupConfigFnObject, ElectronupConfigFnPromise, TsupConfig, ViteConfig, defineConfig };
@@ -3,6 +3,10 @@ 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
+ };
6
10
  var __copyProps = (to, from, except, desc) => {
7
11
  if (from && typeof from === "object" || typeof from === "function") {
8
12
  for (let key of __getOwnPropNames(from))
@@ -15,4 +19,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
15
19
 
16
20
  // index.ts
17
21
  var electronup_exports = {};
22
+ __export(electronup_exports, {
23
+ defineConfig: () => defineConfig
24
+ });
18
25
  module.exports = __toCommonJS(electronup_exports);
26
+ function defineConfig(config) {
27
+ return config;
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ defineConfig
32
+ });
@@ -0,0 +1,7 @@
1
+ // index.ts
2
+ function defineConfig(config) {
3
+ return config;
4
+ }
5
+ export {
6
+ defineConfig
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electronup",
3
- "version": "0.0.6",
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
  }