From 6afe0647992a45fd685d6b1ae5cdbfb7a67367e3 Mon Sep 17 00:00:00 2001 From: terwer Date: Mon, 17 Apr 2023 16:49:04 +0800 Subject: [PATCH] chore(zhi-core): #163 move dependency definition to zhi.json --- apps/zhi-core/public/zhi.js | 43 ----------------------- apps/zhi-core/src/theme/core/lifecycle.ts | 3 -- 2 files changed, 46 deletions(-) delete mode 100644 apps/zhi-core/public/zhi.js diff --git a/apps/zhi-core/public/zhi.js b/apps/zhi-core/public/zhi.js deleted file mode 100644 index ded16fe9..00000000 --- a/apps/zhi-core/public/zhi.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2023, Terwer . All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Terwer designates this - * particular file as subject to the "Classpath" exception as provided - * by Terwer in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com - * or visit www.terwer.space if you need additional information or have any - * questions. - */ - -export default { - dependencies: { - core: [ - { - libpath: "core/plugin-system/plugin.js", - baseType: "ZhiTheme", - format: "cjs", - importType: "require", - runAs: ["Siyuan_MainWindow", "Siyuan_Browser"], - order: 1, - }, - ], - server: [], - web: [], - vendor: [], - plugin: [], - }, -} diff --git a/apps/zhi-core/src/theme/core/lifecycle.ts b/apps/zhi-core/src/theme/core/lifecycle.ts index 36d3a941..aa5de197 100644 --- a/apps/zhi-core/src/theme/core/lifecycle.ts +++ b/apps/zhi-core/src/theme/core/lifecycle.ts @@ -39,7 +39,6 @@ class Lifecycle { private readonly logger private readonly common private ZHI_JSON_SCHEMA = "zhi-schema.json" - private ZHI_JS = "zhi.json" private ZHI_JSON = "zhi.json" constructor() { @@ -68,9 +67,7 @@ class Lifecycle { // json读取 // const { default: data } = await import("/appearance/themes/zhi/zhi-schema.json", { assert: { type: "json" } });data // const { default: data } = await import("/appearance/themes/zhi/zhi.json", { assert: { type: "json" } });data - // const { default: data } = await import("/appearance/themes/zhi/zhi.js");data const zhiSchema = await SiyuanDevice.importZhiThemeJson(this.ZHI_JSON_SCHEMA) - // const zhiJson = await SiyuanDevice.importZhiThemeJs(this.ZHI_JSON) const zhiJson = await SiyuanDevice.importZhiThemeJson(this.ZHI_JSON) this.logger.debug("zhiSchema=>", zhiSchema) this.logger.debug("zhiJson=>", zhiJson)