• Stars
    star
    4,026
  • Rank 10,815 (Top 0.3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🛠 [Beta] 面向研发的低代码元编程,代码可视编辑,辅助编码工具 The coding tools which is visual code editing, auxiliary and Low-code metaprogramming for R&D

由于个人工作原因,近期不太有时间持续迭代,所以寻求帮助支持:Windows 系统支持Vue 支持

微信联系方式:moyuuuuu 备注 mometa

面向研发的低代码元编程(代码可视化)能力


背景

mometa 不是传统主流的低代码平台(如 amis/云凤蝶),mometa 是面向研发的、代码可视设计编辑平台;它更像是 dreamweaver、gui 可视编辑 之于 程序员。

它用于解决的问题有:

  • 对低代码平台不形成依赖,二次开发可以无缝进入代码开发模式
  • 同时支持所见即所得的可视编辑,用于提效,提升开发体验
  • 提供物料生态,可自定义物料,提升物料使用体验,提升复用率

mometa 定位更多是 基于程序员本地开发的模式,新增了可视化编码的能力(修改的也是本地的代码文件本身);
它更像是辅助编码工具,而不是 No-Code (amis/云凤蝶) 的平台方案;
不建议在远端服务起一个本地开发环境,所以没有做在线部署。
目前的实现依赖 webpack dev 开发模式,后续会考虑兼容 vite。

特性

  • 🛠 面向研发的代码可视化编辑,直接作用于源码
    • 响应式布局、路由模拟、物料预览
    • 反向定位(视图定位源码)
    • 拖拽插入物料
    • 拖拽移动
    • 上下移动
    • 删除
    • 替换
    • 层级选择
  • 🍒 开放物料生态,可定制团队内物料库,见 mometa-mat
  • 💎 多语言、多生态支持,目前暂只支持 React,后续有计划支持 Vue
  • 🔥 接入友好,Webpack>=4 插件化接入
  • 🌟 开发友好,物料库支持热更新,不破坏已有开发模式

使用场景

新开发一个页面

  1. 使用团队开发指令,新增一个空的占位路由 & 页面
  2. 进入 mometa,查看本地物料,和远端物料市场,选中自己需要的物料,直接拖拽,基本成型的页面布局完成
  3. 进入 ide,完成数据联调,数据传递等,源码开发

已有历史项目,需要迭代功能,只在某一小块 ui 模块内

  1. 进入 mometa,物料操作插入
  2. 反向定位直接进入 ide 源码开发

操作演示

编辑

反向定位

支持从视图定位代码位置

插入物料

可视化插入物料

删除视图

移动视图

编辑代码

预览

物料预览

响应式布局

路由模拟

如何实现

mometa 实现原理

快速开始

由于 mometa 依赖本地开发环境,只使用在本地开发环境,所以没有搭建在线 demo;在本地开发的时候可以进行使用

git clone https://github.com/imcuttle/mometa.git
cd mometa
pnpm install
pnpm run start:app:cr # 开启本地开发预览模式

如何使用

安装依赖

npm i @mometa/editor -D

使用 antd 物料

  1. 安装 antd 物料
npm i @mometa-mat/antd -D
  1. 在项目根目录中创建 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

NPM 包

作者

This library is written and maintained by imcuttle, [email protected].

More Repositories

1

measure

📏 Measure UI for PSD
HTML
138
star
2

moUploader

mobile Uploader Plugin
JavaScript
31
star
3

remark-heading-id

The remark plugin for supporting custom heading id
JavaScript
29
star
4

request-song-robot

点歌机器人!!!(来自网易云音乐)
JavaScript
27
star
5

autoexam_system

在线考试系统,含自动出卷/在线考试/好友系统/好友聊天/积分系统/后台管理等等
JavaScript
26
star
6

paint_online

基于node socket.io 实现的实时画板实时聊天。
JavaScript
25
star
7

simple-hot-reload-server

simple hot reload server by nodejs
JavaScript
22
star
8

paint_game

简易你画我猜
JavaScript
21
star
9

node-await-event-emitter

await events library like EventEmitter
TypeScript
20
star
10

mometa-mat

mometa-mat 物料定义库
HTML
20
star
11

babel-plugin-danger-remove-unused-import

babel-plugin-danger-remove-unused-import
JavaScript
18
star
12

markdown-editor

markdown-editor as your wish
JavaScript
11
star
13

hot-module-require

Hot modules require like HMR(webpack)
JavaScript
11
star
14

moka

A powerful Service For SPA Blog.
JavaScript
10
star
15

edam

💥 The multifunctional scaffold generator.
JavaScript
9
star
16

live-markd

📝Github Favorite Markdown preview with live rendering & location and highlight changed block.
JavaScript
9
star
17

babel-helper-decorate-react

Babel Helper for custom decorator for React Component
TypeScript
8
star
18

directory-tree

get directory tree string on node.
JavaScript
8
star
19

book-shopping

书窝,基于node express4.x
JavaScript
8
star
20

tiny-i18n

🎈A lightweight yet magical(with react live editable) internationalization's library.
JavaScript
7
star
21

split-word

Splits words like Microsoft word with state machine
JavaScript
7
star
22

rcp

Anything about React Component
TypeScript
6
star
23

html-markdown

Convert from Html to Markdown isomorphically By Javascript.
JavaScript
6
star
24

imcuttle.github.io

HTML
6
star
25

jandan-spider

jandan-spider
JavaScript
6
star
26

react-router-sitemap-builder

react-router-sitemap-builder
JavaScript
6
star
27

visit-tree

Visit tree by pre or post DFS
JavaScript
5
star
28

slider-doc

Make html element to be slider view
HTML
5
star
29

detect-one-changed

Detect first changed html and markdown between old text and new
JavaScript
5
star
30

walli

🚨A manageable validation library.
TypeScript
4
star
31

my-shell-code

summary
Shell
4
star
32

get-less-vars

The way for getting computed variables from less
JavaScript
3
star
33

gh-release-changelog

GitHub release notes by CHANGELOG which supports monorepo or normal repo
JavaScript
3
star
34

medium-image-progressive

Medium's progressive image style
JavaScript
3
star
35

prefix-classname

The useful utility for making scoped classname.
JavaScript
3
star
36

regExp_nfa_dfa_mfa

regExp_nfa_dfa_mfa
Java
3
star
37

open-one-window

Open the only one window
JavaScript
3
star
38

VerifyCode

数字验证码识别->javac -d out -sourcepath src src/moyu/Services.java -encoding ISO-8859-1
Java
3
star
39

my-runner

Run script in sandbox with customized style
JavaScript
2
star
40

absolute-module-mapper-plugin

The plugin on enhanced-resolver to map module path
JavaScript
2
star
41

react-chat

react and webpack demo
JavaScript
2
star
42

dom-libs

The set of dom library
TypeScript
2
star
43

remark-preset-gfm

Remark preset for gfm
HTML
2
star
44

github-similar-server

A github similar static server with a markdown renderer.
JavaScript
2
star
45

react-webpack-lazyloader

The webpack loader for react component
TypeScript
2
star
46

go-js

cli env for frontend command js mode
JavaScript
2
star
47

memoize-fn

A memoization library that caches the result of the different arguments
JavaScript
2
star
48

express-restful-fileman

A restful express router for manage(upload multi-files and remove files) file on web.
JavaScript
2
star
49

less-modify-var-loader

The webpack loader for better replace less variables
JavaScript
2
star
50

suffix-resolve-plugin

enhanced-resolve 插件,为了支持 resolve 不同优先级后缀路径
TypeScript
2
star
51

graduation-project

graduation project about njnu.
C++
2
star
52

react-pizza

The utility for create (p)react component habitat.
JavaScript
2
star
53

transform-json-schema

The umbrella about JSON schema's transformer.
JavaScript
2
star
54

inquirer-store

Make inquirer's answers persistence even be aborted halfway
JavaScript
2
star
55

tranz

The framework for transform anything
TypeScript
1
star
56

prom-race

A better `Promise.race`
JavaScript
1
star
57

rila

TypeScript
1
star
58

walk-tree

Enhanced and multifunctional tree walker
JavaScript
1
star
59

click-popup

The interaction about funny popup animation
JavaScript
1
star
60

babel-plugin-transform-proto-to-assign-robust

This plugin allows Babel to transform all **proto** assignments to a method that will do a shallow copy of all properties with symbol
JavaScript
1
star
61

detect-dep

Detect the dependiencies of import/require by walking AST
TypeScript
1
star
62

react-table-doc

The component about react component document view
JavaScript
1
star
63

detect-tree-changed

Detect tow tree what is updated
JavaScript
1
star
64

run-seq

run a series of tasks with next controller
JavaScript
1
star
65

lerna-cli

lerna cli with custom command extensions, forked with official lerna
JavaScript
1
star
66

require-resolve-hook

Module to hook into the Node.js require and require.resolve function
TypeScript
1
star
67

require-fallback-middle

Module to fallback the Node.js require and require.resolve function
TypeScript
1
star
68

gatsby-starter-netlify-cms

JavaScript
1
star
69

drawflower

drawflowers by js
HTML
1
star
70

jira-extension-script

Jira browser untity script
TypeScript
1
star
71

is-hotkey-combine

The shortest way to check multi-times keydown
JavaScript
1
star
72

hotproxy

A better http-proxy-middleware with hot update config and cli
JavaScript
1
star
73

function-json

Make function to be serializable
JavaScript
1
star
74

interval-check

Polling check by intervally
TypeScript
1
star
75

boxer

a fun game! http://moyuyc.xyz/boxer
Java
1
star
76

greasyfork-scripts

JavaScript
1
star
77

intuitional-test

Make testing is intuitional and convenient in comment, markdown, and so on.
JavaScript
1
star
78

isomorphic-blog

isomorphic-blog based on react redux router / node
JavaScript
1
star
79

typemagic

一个简单、高效、轻量的打字机效果
HTML
1
star
80

input-anywhere

Suggest your input anywhere as your wish
JavaScript
1
star
81

https-wrapper

Wrap http server as https
JavaScript
1
star
82

pacy

[WIP] Smart dev pattern with webpack
JavaScript
1
star
83

babel-plugin-tiny-import

split import from wrap package
JavaScript
1
star
84

rush-papapa

The amusing locate the position of code from UI
JavaScript
1
star
85

lerna-gpm

Lerna command extensions for Git Package Manager
JavaScript
1
star
86

slideImages

slideImage for mobile
JavaScript
1
star