This repository is meant to serve as a general template for how to set up repositories to create a progressive web application.
This application is deployed at https://jsenv.github.io/jsenv-template-pwa/.
Screenshot of lighthouse scores for this template:
If you want to create a regular web application without PWA compatibility, use this template and remove files specific to PWA as explained in PWA compatibility.
- Create a GitHub repository using this template: https://github.com/jsenv/jsenv-template-pwa/generate
- Update fields in package.json, especially
"name"
,"description"
, and"author"
- Update README.md and delete
.github/README.md
- Review LICENSE.txt and
"license"
in package.json
Documentation of the features, how to use and or remove them.
- Formatting: Formatting with prettier
- Linting: Linting with ESLint
- Development: A dev server with auto reload
- Testing: Test files, how to execute them
- Building: Optimize files for production
- Pull request impacts: Track pull requests impacts on Lighthouse, performances and files sizes
- PWA compatibility: Offline + add to home screen compatibility
- Deploying: Auto deployment with github pages
-
Node.js Long Term Support version should be used while coding. At the time of writing this documentation it means version 14.17.0.
-
Default branch of the repository is named main. It can be renamed in repository settings on GitHub.
-
There is 2 type of js files: js meant to be runned by node and js meant to be runned by a browser. To help recognize which are which, browser files use .js extension while node files uses .mjs extension. This pattern is subjective and you are free to change it.