Based on the article How to build a CLI with Node.js by Dominik Kundel.
This package reduces manual work in setting up new components in the Tournant UI repository.
The script will take a component name as its input and creates all folders and files needed to develop it.
Install the package:
yarn add @tournant/scaffold
You can set
description via command line arguments. Example:
tournant-scaffold --name rainbow-button --version 0.2.0 --description A rainbowy button
--name is aliased to
If all (or some) arguments were not given,
scaffold will prompt you for the missing information.
It is important to run the script in the repository root due to
path.resolve() calls during the scaffolding phase.
Regardless if via argument or prompt, the script will assert if the package name can be used on NPM and if the given version number adheres to the semantic version format.