Template of Javier Garcia
- React (18.x)
- Webpack (5.x)
- Typescript (4.x)
- Redux Sagas (1.x)
- Redux Router Dom (6.x)
- Hot Module Replacement (HMR) + Fast Refresh
- Image support (Image Webpack Loader)
- SASS support
- Production build script
- Code linting (ESLint) and formatting (Prettier)
- Test frameworks (Jest + React Testing Library)
- Husky (https://typicode.github.io/husky/#/) precommit (with commit lint https://github.com/conventional-changelog/commitlint/#what-is-commitlint) and prepush (test coverage) configured
- Clone/download repo
npm install
(oryarn install
for yarn)
Development
npm run start-dev
- Build app continuously (HMR enabled)
- App served @
http://localhost:8080
Production
npm run start-prod
- Build app once (HMR disabled) to
/dist/
- App served @
http://localhost:3000
All commands
Command | Description |
---|---|
npm run start-dev |
Build app continuously (HMR enabled) and serve @ http://localhost:8080 |
npm run start-prod |
Build app once (HMR disabled) to /dist/ and serve @ http://localhost:3000 |
npm run build |
Build app to /dist/ |
npm run test |
Run tests |
npm run lint |
Run linter |
npm run lint --fix |
Run linter and fix issues |
npm run start |
(alias of npm run start-dev ) |
Note: replace npm
with npm
in package.json
if you use npm.