Hi! We are really excited that you are interested in contributing to @vite-pwa/create-pwa. Before submitting your contribution, please make sure to take a moment and read through the following guide.
Refer also to https://github.com/antfu/contribute.
The package manager used to install and link dependencies must be pnpm.
To develop and test the @vite-pwa/create-pwa package:
-
Fork the
@vite-pwa/create-pwarepository to your own GitHub account and then clone it to your local device. -
Ensure using the latest Node.js (^18.0.0 || >=20.0.0)
-
@vite-pwa/create-pwauses pnpm v10. If you are working on multiple projects with different versions of pnpm, it's recommended to enable Corepack by runningcorepack enable. -
Check out a branch where you can work and commit your changes:
git checkout -b my-new-branch-
Run
pnpm iin@vite-pwa/create-pwa's root folder -
Run
pnpm run buildin@vite-pwa/create-pwa's root folder. -
Change to
examplesfolder and runnode ../index.jsto test the changes: don't add the created folder to git.
If you're including a new template, follow previous steps, you'll need to add enabled: true to the corresponding template in src/prompts.ts module.
Our suggestion is to run the template creation process, include/modify the assets and then copy it to the corresponding template folder.
To test the new template, run it outside the project folder, we can later add it to the examples folder.