ποΈConfig
Make you templates smart
Config file contains next parameters:
folderPath
folderPathRoot directory to place you components, or array of paths
Default: src/
templatesFolder
templatesFolderPath to your own components templates
Default: templates
multiProject
multiProjectAllows you to set up config for mono-repository with several projects
Default: false
skipFinalStep
skipFinalStepAllows you to switch off last checking step
Default: false
checkExistenceOnCreate
checkExistenceOnCreateAllows you to switch on check component existence on create to avoid replacing
Default: false
templates
templatesObject with structure of your component, or array of objects.
Example:
processFileAndFolderName
processFileAndFolderNameString or function which allows you to remap your component name to folder-name and file-name prefix
Default: PascalCase
Possible values:
camelCasePascalCasesnake_casedash-case(name: string, parts: string[], isFolder: boolean) => string
Example:
placeholders
placeholdersList 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
afterCreation
afterCreationObject with scripts to process you file after creation
Default: undefined
Example:
The most common case for script is to add files to git. It can be done like that:
Last updated