koishi-plugin-theme-martin
Version:
Martin Matin: change theme every time you visit the console
56 lines (54 loc) • 1.93 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name2 in all)
__defProp(target, name2, { get: all[name2], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// external/webui/external/theme-martin/src/index.ts
var src_exports = {};
__export(src_exports, {
Config: () => Config,
apply: () => apply,
name: () => name,
using: () => using
});
module.exports = __toCommonJS(src_exports);
var import_koishi = require("koishi");
var import_path = require("path");
var import_meta = {};
var name = "martin";
var using = ["console"];
var Config = import_koishi.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: (0, import_path.resolve)(__dirname, "../client/index.ts"),
prod: (0, import_path.resolve)(__dirname, "../dist")
});
}
__name(apply, "apply");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Config,
apply,
name,
using
});
//# sourceMappingURL=index.cjs.map