🎚️Config

Make you templates smart

Config file contains next parameters:

folderPath

Root directory to place you components, or array of paths

Default: src/

templatesFolder

Path to your own components templates

Default: templates

multiProject

Allows you to set up config for mono-repository with several projects

Default: false

skipFinalStep

Allows you to switch off last checking step

Default: false

checkExistenceOnCreate

Allows you to switch on check component existence on create to avoid replacing

Default: false

templates

Object with structure of your component, or array of objects.

Example:

Full description can be found on templates page

processFileAndFolderName

String or function which allows you to remap your component name to folder-name and file-name prefix

Default: PascalCase

Possible values:

  • camelCase

  • PascalCase

  • snake_case

  • dash-case

  • (name: string, parts: string[], isFolder: boolean) => string

Example:

Here we has PascalCase for folders and dash-case for files

placeholders

List of placeholders which you can use to build your own component template

Default: #NAME# for a component name #STYLE# for css-module import #STORY_PATH# for storybook title

More info on placeholder page

afterCreation

Object with scripts to process you file after creation

Default: undefined

Example:

Last updated