New Web APP CLI | ProductsWay

New Web APP CLI

May 30, 2021 · Dung Huynh

Context

Vite gets you a fast dev server, but you still need to wire up ESLint, Prettier, Tailwind, Storybook, React Query, and React Hook Form yourself. The new-web-app CLI scaffolds a Vite React project and adds whichever of those tools you pick via flags — no manual config copy-paste.

Usage

npx new-web-app

Options

OptionDescription
-n, --nameFolder name to create
-a, --airbnbAdd ESLint + Prettier with Airbnb style
-t, --tailwindAdd Tailwind CSS
-q, --react-queryAdd React Query
-f, --react-hook-formAdd React Hook Form
-s, --storybookAdd Storybook

Examples

# Full stack with Airbnb style
npx new-web-app -n=react-app -a=yes -q=yes -t=yes

# Long form
npx new-web-app --name=react-app --airbnb=yes --react-query=yes

Demo