Code generator by templates.
Automates the creation of your boilerplate codes with custom templates.
- Creates a new folder in the root of the project.
- Creates the templates files using handlebarsjs.
- For each type of template should be created a sub folder inside the 'templates' folder, containing the necessary files to the component creation. See the structure example:
├─ src
├─ templates
│ ├─ ComponentSassTsx
│ │ ├─ ComponentSass.module.scss.hbs
│ │ ├─ ComponentSass.tsx.hbs
│ │ └─ index.tsx.hbs
│ └─ ComponentStyled
│ ├─ index.tsx.hbs
│ └─ styles.ts.hbs
└── workspace
As in the gif example, you can press the mouse right-click button and select between two options:
- Create Component: generates all the boilerplate files from scratch
- Update Component: this brings up the files that don't exist in the folder
- Creates this file "codebot.config.json"
{
"templateFolderPath": "src/templates"
}
Link to the VSCode extensions marketplace