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. It will then create the necessary folders and some barebones files that are needed to develop components.
The name is, as is the name of the org owning the package, borrowed from the organsitional form of the professinal kitchen, the Brigade de Cuisine. In this brigade, the communard is the chef cooking meals for the others chefs.
Install the package:
yarn add @tournant/communard
You can set
description via command line arguments. Example:
communard --name rainbow-button --version 0.2.0 --description A rainbowy button
--name is aliased to
If all (or some) arguments were not given,
communard 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.