MCPcopy Create free account
hub / github.com/ZToolsCenter/ZTools / readPluginConfigFromFile

Function readPluginConfigFromFile

src/main/api/renderer/pluginDevProjects.ts:71–74  ·  view source on GitHub ↗

* 从文件系统读取并解析 plugin.json * @param configPath - plugin.json 的绝对路径 * @returns 解析后的 JSON 对象 * @throws 文件不存在或 JSON 格式错误时抛出

(configPath: string)

Source from the content-addressed store, hash-verified

69 * @throws 文件不存在或 JSON 格式错误时抛出
70 */
71async function readPluginConfigFromFile(configPath: string): Promise<any> {
72 const content = await fs.readFile(configPath, 'utf-8')
73 return JSON.parse(content)
74}
75
76// ============================================================
77// Dev Projects API

Callers 4

importDevPluginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected