stocky37 / cra-templates

My CRA templates + scripts to build templates from working CRA applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cra-templates

Packages

  • cra-template scripts
  • template-stocky37
    • cra-template-stocky37 (generated)

Scripts

build:fresh

As build fails if run when the generated template workspaces do not exist yet, this script aims to run a build that should always succeed.

Templates

cra-template-stocky37

This is my own personal template and includes the following on top of the base cra-template:

  • react-router v6 for routing
  • react-query for fetching data
  • json-server for mocking JSON APIs locally
  • allow absolute imports from the src directory
  • Dockerfiles for both development and production use
  • can pull envvars from window.env (set in /config.js) or process.env
  • eslint configured with airbnb base and sane defaults
  • prettier configured with my own preferred configuration
  • pretty-package-json configured with defaults for keeping package.jsons prettified and deterministically ordered
  • husky & lint-staged configured to run eslint, prettier and pretty-package-json in a pre-commit hook
  • @welldone-software/why-did-you-render for helping debug rerender issues in development

About

My CRA templates + scripts to build templates from working CRA applications.

License:MIT License


Languages

Language:JavaScript 74.4%Language:HTML 9.8%Language:Shell 8.6%Language:CSS 5.0%Language:Dockerfile 2.2%