Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

很赞!想请教下大佬页面代码生成的开发思路 #17

Open
ishy6 opened this issue Jul 6, 2020 · 7 comments
Open

很赞!想请教下大佬页面代码生成的开发思路 #17

ishy6 opened this issue Jul 6, 2020 · 7 comments

Comments

@ishy6
Copy link

ishy6 commented Jul 6, 2020

想请教下大佬页面代码生成思路,刚好要开发基于vue的代码自动生成,但是没有思路。。

@anye931123
Copy link
Member

可以看一下umi版的code生成方法,原理就是解析json,字符串拼接

@ishy6
Copy link
Author

ishy6 commented Jul 6, 2020

网上有说用AST语法树的,这个有谱吗

@anye931123
Copy link
Member

AST是解析代码用,AST是需先有代码才能生成,你只有Json的话就得自己解析生成代码,当然你也可以按照AST结构生成语法树,你能生成AST那更好,那就直接用babel转代码。

@ishy6
Copy link
Author

ishy6 commented Jul 7, 2020

了解!再冒昧请问下大佬有没有开发在线发布的打算,在线发布的页面部署该如何实现呢

@anye931123
Copy link
Member

得后边开发了,目前的核心编辑器还没写完,在线发布,看你需求如果是low code/no code平台,直接将json保存到后台数据库就行,如果是生成代码,再编译,或者做线上编辑器,需要后台接入其他Ci工具Api来实现

@ishy6
Copy link
Author

ishy6 commented Jul 7, 2020

Awesome!!!给你一百个赞!

@coolphk
Copy link

coolphk commented Dec 21, 2020

请问哪里可以看到umi版的代码生成部分?还有就是请问https://brick-design.github.io/react-visual-editor/这个发布的版本就是umi版的吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants