koishi-plugin-theme-martin
Version:
Martin Matin: change theme every time you visit the console
30 lines (28 loc) • 836 B
JavaScript
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
// external/webui/external/theme-martin/src/index.ts
import { z } from "koishi";
import { resolve } from "path";
var name = "martin";
var using = ["console"];
var Config = z.object({});
function apply(ctx, config) {
ctx.console.addEntry(process.env.KOISHI_BASE ? [
process.env.KOISHI_BASE + "/dist/index.js",
process.env.KOISHI_BASE + "/dist/style.css"
] : process.env.KOISHI_ENV === "browser" ? [
// @ts-ignore
import.meta.url.replace(/\/src\/[^/]+$/, "/client/index.ts")
] : {
dev: resolve(__dirname, "../client/index.ts"),
prod: resolve(__dirname, "../dist")
});
}
__name(apply, "apply");
export {
Config,
apply,
name,
using
};
//# sourceMappingURL=index.mjs.map