Overview Version History Q & A Rating & Review
Boilerplate code creator README
Features
Generate boilerplate code from own templates
Usage
How to create templates:
Create folder 'filegen' in the root of project.
Create templates inside. Example:
Your structure may be like this
-filesgen
---TemplateName1
------someFiles
---TemplateName2
------someFoldersInside
---------someFiles
------someFiles
Write template code. You can write %someValue% which will be replaced by your input when you will create code from this template.
you also can use modifiers:
%someValue.lower% - make your value lowercase
%someValue.upper% - make your value uppercase
%someValue.capital% - make your value capitilized (first letter uppercase)
%someValue.decapital% - make your value decapitilized (first letter lowercase)
For example:
// component.tsx
import cls from 'classnames';
import styles from './styles.module.css'
export interface I%componentName%Props {
}
export const %componentName%: React.FC<I%componentName%Props> = () => {
return (
<div cls={styles.%componentName.decapital%}>
</div>
)
}
//styles.module.css
.%componentName.decapital% {
}
you can use it also for folders or files names:
---%folderNamevalue%
------%componentName%.tsx
Once you created templates you can start use it. Just right click on any folder and find 'Create from template' option.
You will be requested to fill all %values% you used in templates.
Release Notes
1.0.0
Initial release
License
MIT