1.0.2 • Published 2 years ago

schema-convert-source-code v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

该包已废弃,请移步到

@dumbbell/stsc

将阿里低代码引擎的 schema 转换为源码

功能处于持续迭代中。

  • 将类组件转换为函数组件
  • 支持代码拆分
  • 二次开发友好

待办列表

  • √ 将 schema.state 解析为 useReducer
  • √ 将 schema.methods 解析为函数组件中的方法
  • √ 转换 componentDidMount
  • 基于 schema.chunk 拆分 component 代码
  • 基于组件库元数据注册资源
    • 目前只处理了this.setStatethis.state
  • 函数组件引入依赖
  • schema.lifeCycles 解析为 useEffect
  • 转换 componentWillUnmount
  • 转换 shouldComponentUpdate
  • 转换 getSnapshotBeforeUpdate
  • 转换 componentDidUpdate
  • 转换 componentWillMount
  • 解析 schema.dataSource
  • 解析 schema.css
  • 解析 schema.children
  • 完善脚手架项目管理流程
  • 完善代码 lint 及格式化