0.0.1 • Published 2 years ago

fortunate v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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)

0.0.1

2 years ago