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

Feat add React Generator #933

Merged
merged 11 commits into from
Aug 11, 2021
Merged

Feat add React Generator #933

merged 11 commits into from
Aug 11, 2021

Conversation

fyangstudio
Copy link
Collaborator

@fyangstudio fyangstudio commented Aug 4, 2021

为了更清晰的插件职责划分,将生成代码部分功能通过新的 React Generator 插件提供。

新增 React Generator 插件

使用

生成 typescript 代码

  • 通过 JSON 生成 typescript interface 文件

img

生成样式代码

  • 生成 dark mode 代码(在 css 文件或目录中右键,选择 AppWorks:分析 CSS 文件中的颜色,生成「深色模式」的样式代码

img

创建文件时自动填充样板代码

  • 生成页面组件代码
  • 生成通用组件代码
  • 生成 module 和 store 状态管理文件

img

img

@fyangstudio fyangstudio changed the base branch from master to release/1.4.0 August 4, 2021 07:42
@codecov-commenter
Copy link

codecov-commenter commented Aug 4, 2021

Codecov Report

Merging #933 (51c3dfd) into release/1.4.0 (fee2ad2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##           release/1.4.0     #933   +/-   ##
==============================================
  Coverage          57.14%   57.14%           
==============================================
  Files                  1        1           
  Lines                 70       70           
  Branches              18       18           
==============================================
  Hits                  40       40           
  Misses                30       30           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fee2ad2...51c3dfd. Read the comment docs.

@luhc228
Copy link
Contributor

luhc228 commented Aug 9, 2021

dark mode 那一部分,要不要结合主题库的主题变量搞?

@fyangstudio
Copy link
Collaborator Author

fyangstudio commented Aug 9, 2021

dark mode 那一部分,要不要结合主题库的主题变量搞?

这个方案和主题变量的方案 并不冲突。可以更快速支持 dark mode,提升老业务升级支持效率

RFC: https://yuque.antfin-inc.com/appworks/tsc/pls17r

extensions/react-generator/README.md Outdated Show resolved Hide resolved
extensions/react-generator/README.md Outdated Show resolved Hide resolved
extensions/react-generator/src/jsonToTsInterface/index.ts Outdated Show resolved Hide resolved
@fyangstudio fyangstudio merged commit 1cb6ed1 into release/1.4.0 Aug 11, 2021
@fyangstudio fyangstudio deleted the feat-react-generator branch August 11, 2021 07:12
@fyangstudio fyangstudio mentioned this pull request Aug 11, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants