Skip to content

工程架构

Monorepo 架构

Schemly 采用 pnpm workspace 管理,包含四个包:

职责发布
@schemly/core类型、常量、解析引擎、校验、迁移
@schemly/runtimeSchemlyRenderer、Cell 渲染器、composables
@schemly/designerSchemlyDesigner、配置面板
playground开发调试、示例演示

依赖关系

playground → designer → runtime → core
                     → core

构建策略

工具输出
coreunbuildESM + CJS + d.ts,零依赖
runtimevite lib modeESM + CJS + d.ts,externalize vue / element-plus
designervite lib modeESM + CJS + d.ts
playgroundvite app modeSPA

vueelement-plus 作为 peerDependencies。

开发顺序

Phase 1: core(类型 → 常量 → 解析器 → 校验器)
Phase 2: runtime(cells → composables → components)+ playground
Phase 3: designer(状态管理 → 配置面板 → 预览)
Phase 4: 完善(迁移、测试、文档)

技术栈

  • Vue 3 — 渲染框架
  • Element Plus — UI 组件库
  • TypeScript — 类型安全
  • Vite — 构建工具
  • Vitest — 单元测试
  • pnpm — 包管理

Released under the MIT License.