mirror of
https://gitee.com/dgflash/oops-plugin-framework.git
synced 2026-06-19 19:17:21 +08:00
删除编辑器扩展废弃代码
This commit is contained in:
16
dist/main.js
vendored
16
dist/main.js
vendored
@@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.methods = exports.config = exports.unload = exports.load = void 0;
|
||||
const child_process_1 = require("child_process");
|
||||
const electron_1 = require("electron");
|
||||
/**
|
||||
* @en Hooks triggered after extension loading is complete
|
||||
@@ -47,20 +46,5 @@ exports.methods = {
|
||||
/** 点亮 Github 星星 */
|
||||
github() {
|
||||
electron_1.shell.openExternal('https://github.com/dgflash/oops-framework');
|
||||
},
|
||||
update() {
|
||||
let path = __dirname.replace("extensions\\oops-plugin-framework\\dist", "") + "update-oops-plugin-framework.bat";
|
||||
console.log(path);
|
||||
(0, child_process_1.exec)(path, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`执行批处理文件时出错: ${error}`);
|
||||
return;
|
||||
}
|
||||
if (stderr) {
|
||||
console.error(`批处理文件的错误输出: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
console.log(`批处理文件的输出: ${stdout}`);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
17
src/main.ts
17
src/main.ts
@@ -1,4 +1,3 @@
|
||||
import { exec } from "child_process";
|
||||
import { shell } from "electron";
|
||||
|
||||
/**
|
||||
@@ -47,21 +46,5 @@ export const methods: { [key: string]: (...any: any) => any } = {
|
||||
/** 点亮 Github 星星 */
|
||||
github() {
|
||||
shell.openExternal('https://github.com/dgflash/oops-framework');
|
||||
},
|
||||
update() {
|
||||
let path = __dirname.replace("extensions\\oops-plugin-framework\\dist", "") + "update-oops-plugin-framework.bat";
|
||||
console.log(path);
|
||||
|
||||
exec(path, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`执行批处理文件时出错: ${error}`);
|
||||
return;
|
||||
}
|
||||
if (stderr) {
|
||||
console.error(`批处理文件的错误输出: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
console.log(`批处理文件的输出: ${stdout}`);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user