electronup 0.0.1 → 0.0.2
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 +1 -28
- package/package.json +2 -1
package/dist/bin/electronup.js
CHANGED
|
@@ -7,9 +7,6 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
10
|
var __copyProps = (to, from, except, desc) => {
|
|
14
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -31,30 +28,6 @@ var __publicField = (obj, key, value) => {
|
|
|
31
28
|
return value;
|
|
32
29
|
};
|
|
33
30
|
|
|
34
|
-
// node_modules/.pnpm/electron@22.3.14/node_modules/electron/index.js
|
|
35
|
-
var require_electron = __commonJS({
|
|
36
|
-
"node_modules/.pnpm/electron@22.3.14/node_modules/electron/index.js"(exports, module2) {
|
|
37
|
-
var fs = require("fs");
|
|
38
|
-
var path2 = require("path");
|
|
39
|
-
var pathFile = path2.join(__dirname, "path.txt");
|
|
40
|
-
function getElectronPath() {
|
|
41
|
-
let executablePath;
|
|
42
|
-
if (fs.existsSync(pathFile)) {
|
|
43
|
-
executablePath = fs.readFileSync(pathFile, "utf-8");
|
|
44
|
-
}
|
|
45
|
-
if (process.env.ELECTRON_OVERRIDE_DIST_PATH) {
|
|
46
|
-
return path2.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath || "electron");
|
|
47
|
-
}
|
|
48
|
-
if (executablePath) {
|
|
49
|
-
return path2.join(__dirname, "dist", executablePath);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Electron failed to install correctly, please delete node_modules/electron and try installing again");
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
module2.exports = getElectronPath();
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
31
|
// src/cli.ts
|
|
59
32
|
var import_path6 = require("path");
|
|
60
33
|
var import_cac = require("cac");
|
|
@@ -185,7 +158,7 @@ async function getBuilderConfig(config, allConfig) {
|
|
|
185
158
|
var import_path3 = require("path");
|
|
186
159
|
var import_child_process = require("child_process");
|
|
187
160
|
var import_dotenv = require("dotenv");
|
|
188
|
-
var import_electron = __toESM(
|
|
161
|
+
var import_electron = __toESM(require("electron"));
|
|
189
162
|
var defaultEnvPath = (0, import_path3.resolve)(store.root, ".env");
|
|
190
163
|
var { parsed: defaultEnv } = (0, import_dotenv.config)({ path: defaultEnvPath });
|
|
191
164
|
var getModeDev = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electronup",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "融合构建 electron 应用需要的构建工具,保留原有配置习惯的命令行工具 ",
|
|
5
5
|
"author": "quiteer",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@types/node": ">= 16",
|
|
41
|
+
"electron": ">= 20",
|
|
41
42
|
"node": ">= 16",
|
|
42
43
|
"vue": ">= 3"
|
|
43
44
|
},
|