mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-20 01:58:04 +08:00
✨ 支持插件开发者模式
This commit is contained in:
@@ -68,8 +68,8 @@ class AdapterHandler {
|
||||
}
|
||||
|
||||
// 安装并启动插件
|
||||
async install(adapters: Array<string>) {
|
||||
const installCmd = "install";
|
||||
async install(adapters: Array<string>, options: { isDev: boolean }) {
|
||||
const installCmd = options.isDev ? "link" : "install";
|
||||
// 安装
|
||||
await this.execCommand(installCmd, adapters);
|
||||
}
|
||||
@@ -110,11 +110,13 @@ class AdapterHandler {
|
||||
/**
|
||||
* 卸载指定插件
|
||||
* @param {...string[]} adapters 插件名称
|
||||
* @param options
|
||||
* @memberof AdapterHandler
|
||||
*/
|
||||
async uninstall(adapters: string[]) {
|
||||
async uninstall(adapters: string[], options: { isDev: boolean }) {
|
||||
const installCmd = options.isDev ? "unlink" : "uninstall";
|
||||
// 卸载插件
|
||||
await this.execCommand("uninstall", adapters);
|
||||
await this.execCommand(installCmd, adapters);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user