Our standard set of reusable templates based on the lovely simple-scaffold CLI package.
You can either use it as a command line tool or import into your own code.
# npm
npm install [-g] @sumocreations/scaffold
# yarn
yarn [global] add @sumocreations/scaffold
# run without installing
npx @sumocreations/scaffold@latest <...args>
A bare bones example:
yarn scaffold Button -t component
In a module with some pre-defined props:
yarn scaffold Common/Button -t component -p "label:string disabled?:boolean"
yarn scaffold Form/Signup -t form
yarn scaffold Field/TextArea -t field
To refine existing or create new templates, it's best to test them locally in this package. To do so just run the local scaffold script and use ./tmp
as your output directory:
yarn scaffold --name test -t component ./tmp/Component/TestComponent