/react-static-starter-kit

Experimental React static prerendered app starter kit

Primary LanguageTypeScriptMIT LicenseMIT

React Static Starter Kit CI CD

This is an experimental starter kit for a React static app.

Features

  1. React Router
  2. CSS Modules + PostCSS + PurgeCSS + StyleLint
  3. TypeScript + ESLint
  4. Vite
  5. Vitest/React Testing Library for unit testing
  6. Playwright for E2E testing
  7. Custom i18n solution using sprintf-js
  8. Web workers
  9. CI/CD workflows with GitHub Actions

Usage

# Install pre-commit
$ brew install pre-commit # or pip install pre-commit

# Install Playwright browsers
$ npx playwright install

# Install dependencies
$ npm install

# Run in dev
$ npm run dev

# Run E2E tests
$ npm test

# Run unit tests
$ npm unit

# Build for prod
$ npm run build

# Builds the app but skips all HTML/CSS/JS compressions
$ npm run build --raw

See scripts in package.json for additional commands.

Using as Repository Template

When using react-static-starter-kit as a template, follow these steps to strip placeholder content:

  1. Replace LICENSE file
  2. Edit README.md
  3. Edit fields in package.json
  4. Edit fields in app.config.ts
  5. Edit resources in res/, then ensure to replace the generated assets in src/public/
  6. Edit files in src/ui/
  7. Edit translations in src/locales/