Pre-configured repo for Frontend development with my favorite tooling.
nodev22.5.1 controlled withasdfreactv18.3.1typescriptand Matt Pocock'sts-resetclassnamesto conditionally apply styling via CSS classestailwindCSS- PostCSS, with these plugins:
postcss-import: to inline at-import rules contenttailwindcsspostcss-preset-env: to apply plugins when CSS code is not supported based on MDN/CanIUse data and browserslist config. It includes Autoprefixer under-the-hood and adds prefixes when needed
browserslistvite, configured with tsconfig-paths and browserslist configvitestfor testing, including@testing-library/reactand other packagesprettierwith Tailwind plugineslintwith strict TS typed-recommended configs, including these plugins:eslint-plugin-reacteslint-plugin-react-hookseslint-plugin-react-refresheslint-plugin-tailwindcsseslint-plugin-jsx-a11yeslint-plugin-compateslint-plugin-import
- Github Action to deploy on Fly.io
The repo is already setup to deliver a single SVG sprite, located at assets/icons/sprite.svg.
New icons can be wrapped with <symbol> tags and pasted into the sprite. Then, the scripts/gen-icon-types.ts script parses the icons and generates a union type at app/components/icon/icon-types.ts with all ids found.
This leads to a type-safe React <Icon> component that is performant and fully compatible with all modern browsers.