feat: v0.2.5 — 内置语法高亮 + exportPDF + benchmark + CI 并行

- 新增 src/highlight.ts 零依赖轻量高亮器:13 种语言,先转义后
  着色保证安全,输出 me-hl-* 类,MeEditor.highlight 即插即用
- exportTool 新增 editor.exportPDF()(隐藏 iframe + window.print),
  exportHTML/exportPDF 共用 HTML 构建逻辑
- imagePaste 支持 maxSizeKB 限制,超限 toast 警告
- npm run bench 性能基准:parseMarkdown 1MB ≈ 51ms
- CI 测试拆分为 parser/core/rest 三个并行 job + 跨版本 verify job
- docs.html/README 补齐新 API、事件、高亮文档;取消跟踪 dist 产物;
  版本 0.2.4 → 0.2.5,测试 725 → 768
This commit is contained in:
2026-08-09 08:59:55 +08:00
parent fae31bba60
commit 5919dd9f66
13 changed files with 641 additions and 58 deletions
+4 -4
View File
@@ -61,15 +61,15 @@ echo "✅ 构建成功完成!"
echo ""
echo "📁 文件结构:"
echo " - dist/metona-editor.js (UMD格式)"
echo " - dist/metona-editor.esm.js (ES Module格式)"
echo " - dist/metona-editor.cjs.js (CommonJS格式)"
echo " - dist/metona-editor.mjs (ES Module格式)"
echo " - dist/metona-editor.cjs (CommonJS格式)"
echo " - dist/metona-editor.min.js (压缩版本)"
echo " - dist/metona-editor.d.ts (TypeScript声明)"
echo ""
echo "🚀 使用方法:"
echo " 1. 浏览器: <script src='dist/metona-editor.js'></script>"
echo " 2. ES Module: import MeEditor from 'dist/metona-editor.esm.js'"
echo " 3. CommonJS: const MeEditor = require('dist/metona-editor.cjs.js')"
echo " 2. ES Module: import MeEditor from 'dist/metona-editor.mjs'"
echo " 3. CommonJS: const MeEditor = require('dist/metona-editor.cjs')"
echo ""
echo "📝 示例:"
echo " 打开 site/index.html 查看官网"