@sumocreations/scaffolds
v1.1.6
Published
A shared library containing a mix of utility or helper functions.
Readme
@sumocreations/scaffold
Our standard set of reusable templates based on the lovely simple-scaffold CLI package.
Install
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>Examples
Generate a Component
A bare bones example:
yarn scaffold Button -t componentIn a module with some pre-defined props:
yarn scaffold Common/Button -t component -p "label:string disabled?:boolean"Generate a Form (react-hook-form)
yarn scaffold Form/Signup -t formGenerate a Form Field (react-hook-form)
yarn scaffold Field/TextArea -t fieldDeveloping this Package
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