This repository contains a boilerplate for static React site using Next.js and Typescript with minimal dependencies.
- Hot-Reloading in development
- Automatic routing
- Automatic code splitting
- Static site generation
- Typescript support
- Offline support
- PWA support
- Multi-language support
- Unit test support
Install all dependencies
npm i
Run locally with hot reloading
npm start
Run locally as static production build (Requires serve dependency)
npm run serve
Analyze bundle
npm run analyze
Remove temporary files and directories
npm run clean
Lint project files
npm run lint
Run unit tests
npm test
Generate unit test coverage report
npm run test:coverage
Build project files
npm run build
Package static files
npm run package
Deploy to S3 - Requires AWS-CLI, See ./scripts/uploadToS3.sh for details
npm run deploy
React components which could be reused in multiple pages or are complex enough to move them to another file and test them individually.
Internal code that can be reused and is not specific to an individual project such as apis, contexts, hooks, middleware, utilities, etc.
In Next.js, a page is a React Component exported from a .js, .jsx, .ts, or .tsx file in the pages directory. Each page is associated with a route based on its file name.
Next.js can serve static files, like images, under a folder called public in the root directory. Files inside public can then be referenced by your code starting from the base URL (/)
Miscellaneous scripts used for tooling, automation, deployments, etc.
Please see the code of conduct form.
Please see the contributing form.
Please see the pull request form.
Copyright © 2019-present Eric Dobyns.