A Deno-based CLI tool for scaffolding icon components for OE3.
I chose Deno for this project because of ease of distribution. I did not want publish this as an NPM package so being able to run this CLI from a URL maximizes compatibility.
You must install Deno on your local machine before using this CLI. Instructions are on the Deno website or their install page.
Once Deno is installed, run the following command in the root of the offer-engine-3 repository. Make sure to replace [Icon] with the name of the icon you are generating.
deno run --allow-write --allow-read --unstable https://raw.githubusercontent.com/joshuayoes/generate-icons/master/app.ts [Icon]
It will generate the following components at ~/component-library/src/components/icons
.
├── __tests__
│ └── [Icon].test.tsx
├── [Icon].tsx
└── _.stories.tsx