Skip to content

douglasgomes98/codebot

Repository files navigation


Codebot

Code generator by templates.

About

Automates the creation of your boilerplate codes with custom templates.

Creating a component

Getting started with the templates creation:

  1. Creates a new folder in the root of the project.
  2. Creates the templates files using handlebarsjs.
  3. 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

Template example

Using the extension:

As in the gif example, you can press the mouse right-click button and select between two options:

  1. Create Component: generates all the boilerplate files from scratch
  2. Update Component: this brings up the files that don't exist in the folder

Changing the configurations

  1. Creates this file "codebot.config.json"
{
  "templateFolderPath": "src/templates"
}

Link to the VSCode extensions marketplace

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •