Skip to content

KingZhang/react-component-creator-plugin

 
 

Repository files navigation

react-component-creator

Downloads Version Rating

  • An Brainstorm Plugin to create a new react functional component with all additional files like LESS, Spec, Storybook.
  • Add Redux reducer module with actions, mutations, state and types.
  • Add custom templates to match your coding style and your needs.

修改点

主要是针对项目做了适配修改,比如新增模板文件、测试文件单独存放等等

image-20220423225506561

image-20220423233459847

项目构建需要使用低版本idea库,高版本不兼容,ideaIU-2020.2.4.win https://www.jetbrains.com/idea/download/other.html 直接导入已构建的react-component-creator-plugin-0.X.0.zip可直接使用

0.9.0

  • 新增hook测试

0.8.0

  • 新增创建目录选项
  • 新增hook和presenter选项
  • 新增presenter简单逻辑生成

Custom Templates

If you are not happy with the predefined templates, you can choose your own templates. The templates will be processed with mustache as templating. All variables can also be used for the filenames.

Following variables are available

Component

variable Description
{{componentName}} the inputted component name. Without any alterations
{{componentCamelcaseName}} Camelcased input my-component becomes MyComponent

Reducer

variable Description
{{actionFunctionName}} Name of the function inside the actions.ts file
{{moduleName}} Name of the folder
{{mutationType}} String which will be used as type of the dispatch/mutation
{{moduleNamePascalCase}} Pascalcased moduleName
{{stateName}} Name for the state. my-component becomes MyComponentState
{{actionTypeName}} Takes the input of actionFunctionName and capitalizes the first letter and appends Action. From setData becomes SetDataAction
{{actionTypesEnumName}} Name used for the action types enum. actionTypesEnumName is the namespace where all mutationType actions are kept

Development

Follow the Setup Instructions

Icons

Icons provided by https://www.iconfinder.com/justicon via https://www.iconfinder.com

About

React Component Creation plugin for JetBrains IDE

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.0%
  • Mustache 8.0%