Skip to content

Template when generating react mobx using generate-react-template in VSCode

Notifications You must be signed in to change notification settings

BH-M87/generate-react-mobx-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

generateReactMobxTemplate

Template when generating react mobx using generate-react-template in VSCode

Usage refers to https://marketplace.visualstudio.com/items?itemName=joshjg.generate-react-component

Usage

  1. Install the extention of VSCode first: ext install generate-react-component.
  2. Clone this project into your local workspace.
  3. Change the config "generate-react-component.componentTemplatePath" in VSCode preference (Keyboard shortcuts: cmd + ,)to the path of this project in your local drive.
  4. Change "generate-react-component.conditionals" if you added additional condition.
  5. Right click any directory in the explorer panel.
  6. Select component or container.
  7. Input name and choose options.
  8. Submit and happy coding.

Syntax

Template syntax is very simple:

Any occurrence of ComponentName in a filename or a file's content will be replaced with the user's text input. Any text surrounded by /* IF condition / and / ENDIF /, where condition is the name of an option (definted in the package settings) will be removed unless condition is enabled (or invalid) Any text surrounded by / IF !condition / and / ENDIF / will be removed unless condition is disabled (or invalid) Any remaining / IF / or / ENDIF */ comments will be removed, but the text between them will be untouched

About

Template when generating react mobx using generate-react-template in VSCode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published