fortunate
v0.0.1
Published
Fortunate is a simple and easy to use library for generating boilerplate code.
Downloads
14
Readme
Fortunate
Fortunate is a simple and easy to use library for generating boilerplate code.
Installation
$ npm install --save-dev fortunate
Usage
Create __fortunate__
directory to directory where you want to generate boilerplate code. Inside this you can create
infinite number of different templates where template name is directory name.
Variables yield format __fortunate_variableName__
and can be used in filenames, directory names and in file content.
Directory structure example with React components:
components
__fortunate__
new-component
__fortunate_name__
__fortunate_name__.module.css
__fortunate_name__.tsx
__fortunate_name__.test.tsx
index.ts
index.ts
Button
Button.module.css
Button.tsx
Button.test.tsx
index.ts
index.ts
When template is created you can run fortunate
command in root directory of your project. You will be asked to select
template. After that you will be asked to provide values for variables. After that files will be generated.
$ npx fortunate
Caveats
.gitignore
files are currently ignored (will be configurable in the future)