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 iRun locally with hot reloading
npm startRun locally as static production build (Requires serve dependency)
npm run serveAnalyze bundle
npm run analyzeRemove temporary files and directories
npm run cleanLint project files
npm run lintRun unit tests
npm testGenerate unit test coverage report
npm run test:coverageBuild project files
npm run buildPackage static files
npm run packageDeploy to S3 - Requires AWS-CLI, See ./scripts/uploadToS3.sh for details
npm run deployReact 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.