From 2cf606b1de119478087f676808e9e2a06cdb04af Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sun, 22 Sep 2024 07:57:49 +0800 Subject: [PATCH] perf(plugin-md-power): optimize structure (#204) --- .../src/client/components/CanIUse.vue | 8 +- .../src/client/components/CodeEditor.vue | 4 +- .../src/client/components/CodeSandbox.vue | 10 +- .../fileTree/definitions.ts | 0 .../fileTree/findIcon.ts | 0 .../{features => container}/fileTree/index.ts | 0 .../fileTree/resolveTreeNodeInfo.ts | 0 .../src/node/container/index.ts | 19 +++ .../node/{features => container}/langRepl.ts | 0 .../src/node/{features => embed}/caniuse.ts | 4 +- .../{features => embed/code}/codeSandbox.ts | 10 +- .../node/{features => embed/code}/codepen.ts | 10 +- .../node/{features => embed/code}/jsfiddle.ts | 10 +- .../node/{features => embed/code}/replit.ts | 10 +- .../createEmbedRuleBlock.ts} | 6 +- .../plugin-md-power/src/node/embed/index.ts | 55 ++++++++ .../src/node/{features => embed}/pdf.ts | 4 +- .../{features => embed}/video/bilibili.ts | 4 +- .../node/{features => embed}/video/youtube.ts | 4 +- .../node/{features => enhance}/imageSize.ts | 0 plugins/plugin-md-power/src/node/index.ts | 2 +- .../src/node/{features => inline}/icons.ts | 9 +- .../plugin-md-power/src/node/inline/index.ts | 22 ++++ .../src/node/{features => inline}/plot.ts | 11 +- plugins/plugin-md-power/src/node/plugin.ts | 124 ++++-------------- 25 files changed, 169 insertions(+), 157 deletions(-) rename plugins/plugin-md-power/src/node/{features => container}/fileTree/definitions.ts (100%) rename plugins/plugin-md-power/src/node/{features => container}/fileTree/findIcon.ts (100%) rename plugins/plugin-md-power/src/node/{features => container}/fileTree/index.ts (100%) rename plugins/plugin-md-power/src/node/{features => container}/fileTree/resolveTreeNodeInfo.ts (100%) create mode 100644 plugins/plugin-md-power/src/node/container/index.ts rename plugins/plugin-md-power/src/node/{features => container}/langRepl.ts (100%) rename plugins/plugin-md-power/src/node/{features => embed}/caniuse.ts (96%) rename plugins/plugin-md-power/src/node/{features => embed/code}/codeSandbox.ts (82%) rename plugins/plugin-md-power/src/node/{features => embed/code}/codepen.ts (86%) rename plugins/plugin-md-power/src/node/{features => embed/code}/jsfiddle.ts (80%) rename plugins/plugin-md-power/src/node/{features => embed/code}/replit.ts (76%) rename plugins/plugin-md-power/src/node/{utils/createRuleBlock.ts => embed/createEmbedRuleBlock.ts} (89%) create mode 100644 plugins/plugin-md-power/src/node/embed/index.ts rename plugins/plugin-md-power/src/node/{features => embed}/pdf.ts (92%) rename plugins/plugin-md-power/src/node/{features => embed}/video/bilibili.ts (94%) rename plugins/plugin-md-power/src/node/{features => embed}/video/youtube.ts (93%) rename plugins/plugin-md-power/src/node/{features => enhance}/imageSize.ts (100%) rename plugins/plugin-md-power/src/node/{features => inline}/icons.ts (96%) create mode 100644 plugins/plugin-md-power/src/node/inline/index.ts rename plugins/plugin-md-power/src/node/{features => inline}/plot.ts (90%) diff --git a/plugins/plugin-md-power/src/client/components/CanIUse.vue b/plugins/plugin-md-power/src/client/components/CanIUse.vue index f8a9e7b4..9449e12d 100644 --- a/plugins/plugin-md-power/src/client/components/CanIUse.vue +++ b/plugins/plugin-md-power/src/client/components/CanIUse.vue @@ -68,15 +68,11 @@ function parseData(data: string | MessageData): MessageData { :data-past="past" :data-future="future" > -