The script will allow creating a new component in the folder src/components
. If the given path ends with a component name (detection is made if the last part of the path is in PascalCase), then it will detect the new component created is a sub-component and put it in an subComponents
folder. A new export
is automatically added (and sorted alphabetically) into the index.js
file of the parent folder.
validFolders
→ List of folders where a new component can be createdsubComponentFolderName
→ Name of the folder for sub-components
Initial folder structure: