2 Star 1 Fork 1

范铁男 / 低代码二开工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Dumbbell

低代码二次开发工具,将阿里低代码引擎的 schema,转换为 react 函数组件并且可进行二次开发的源码,源码将脱离低代码引擎成为 ”干净的“ react 项目。

项目代码是基于 rush+pnpm 的多包项目,请参考:

存在的意义

解决以下痛点:

  • 导出的源码,绝大部分代码对于二次开发来说都是都是黑盒。
  • 导出的源码是react类组件且react版本是 16.x
  • 导出的源码项目,使用 yarn 或者 pnpm 初始化会报错,只能使用 npm。
  • 要运行导出的源码项目,就必须依赖低代码引擎相关的依赖,并不是真正意义上的“源码项目”。

使用方法

目前处于开发阶段功能还不稳定,此期间会频发布

$ npx stsc

配置文件

import { resolve } from 'node:path';
import { defineConfig } from '../packages/stsc/src';

export default defineConfig({
  schemaFile: './lc-config/schema.json',
  assetsFile: './lc-config/assets.json',
  entryHtmlFile: './index.html',
});
  • 从 scheam

image

  • 到源码

image

image

测试

使用Vitest作为测试框架,可以查看测试用例了解功能:

$ cd packages/stsc
$ rushx test

示例

示例代码目录 example,可以在此项目进行调试。

The MIT License (MIT) Copyright (c) 2022-present Tienan Fan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

将阿里低代码引擎的schema,转换为react函数组件并且可进行二次开发的源码,源码将脱离低代码引擎成为”干净的“react项目。 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/fan-tienan/dumbbell.git
git@gitee.com:fan-tienan/dumbbell.git
fan-tienan
dumbbell
低代码二开工具
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891