A powerful command-line interface (CLI) tool for quickly generating modern, ready-to-use Progressive Web Application (PWA) boilerplates using React, Vue, or Svelte, pre-configured with Vite, TypeScript, and PWA manifest files.
vite-plugin-pwa) with logic for:You can use the tool via npx or the modern npm create command.
Run the following command and follow the interactive prompts:
npx create-pwa-boilerplate@latest my-pwa-app-name
# OR
npm create pwa-boilerplate@latest my-pwa-app-name
Navigate into your new directory, install dependencies, and start the development server:
cd my-pwa-app-name
npm install
# or pnpm install / yarn install
npm run dev
The generator currently supports the following options:
| Template | Language | Styling | Build Tool |
|---|---|---|---|
| React | TypeScript | Tailwind CSS (Optional) | Vite |
| Vue 3 | TypeScript | Tailwind CSS (Optional) | Vite |
| Svelte | TypeScript | Tailwind CSS (Optional) | Vite |
Each generated project includes a PwaFeaturesGrid component demonstrating key native browser features.
npm run dev).http://localhost:5173).To run and contribute to the create-pwa-boilerplate CLI itself:
Clone the Repository:
git clone [Your Repository URL]
cd create-pwa-boilerplate
Install Dependencies:
npm install
# or pnpm install
Build the CLI:
# Compiles generator/index.ts to dist/index.js
npm run build
Test Locally (Recommended): Use npm link to simulate a global installation.
# In the root of this project:
npm link
# Go to any other directory and test:
create-pwa-boilerplate my-test-app
If you are a maintainer, use the following commands. Ensure the version is incremented before publishing.
# Ensure package.json has "files": ["dist", "templates"]
npm run build
npm publish --access public
MIT License