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-pwa
repository 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-pwa
uses pnpm v9. 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 i
in@vite-pwa/create-pwa
's root folder -
Run
pnpm run build
in@vite-pwa/create-pwa
's root folder. -
Change to
examples
folder and runnode ../index.js
to 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.