imcuttle / mometa
- понедельник, 17 января 2022 г. в 00:29:38
🛠 [Beta] 面向研发的低代码元编程,代码可视编辑,辅助编码工具
面向研发的低代码元编程(代码可视化)能力
mometa 不是传统主流的低代码平台(如 amis/云凤蝶),mometa 是面向研发的、代码可视设计编辑平台;它更像是 dreamweaver、gui 可视编辑 之于 程序员。
它用于解决的问题有:
npm i @mometa/editor -D
npm i @mometa-mat/antd -D
mometa-material.config.js
module.exports = [require('@mometa-mat/antd').default]
你也可以创建自己的物料库,数据结构规则见 Material 定义
webpack.config.js
修改如下:
const MometaEditorPlugin = require('@mometa/editor/webpack')
module.exports = {
module: {
rules: [
{
test: /\.(js|mjs|jsx|ts|tsx)$/,
// 注意,只需要处理你需要编辑的文件目录
include: paths.appSrc,
loader: require.resolve('babel-loader'),
options: {
plugins: [isEnvDevelopment && require.resolve('@mometa/editor/babel/plugin-react')]
}
}
]
},
plugins: [
isEnvDevelopment &&
new MometaEditorPlugin({
react: true,
// 开启物料预览
experimentalMaterialsClientRender: true
})
]
}
注意:使用时,不需要开启官方预设的 react-refresh,mometa 默认会开启 react-refresh 能力
启动 webpack dev server,开启 http://localhost:${port}/mometa/
即可
提供的例子可见 @mometa/app
git clone https://github.com/imcuttle/mometa.git
cd mometa
pnpm install
cd packages/app && pnpm start # 开启本地开发预览模式
This library is written and maintained by imcuttle, imcuttle@163.com.