The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
翻譯準備中
開發工具TypeScript · C#GitHub @pwa-builder自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
安裝型專案無需部署網域也可驗證。個人儲存庫可透過 GitHub 登入驗證,組織儲存庫可使用上方的儲存庫驗證檔案。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗The simplest way to create progressive web apps across platforms and devices.
This repo is home to several projects in the PWABuilder family of tools.
| Tools | Overview | Source | Docs | Contribute |
|---|---|---|---|---|
| PWABuilder.com | The best way to package PWAs for various stores. | /apps/pwabuilder | PWABuilder docs | Wiki |
| PWA Studio | PWA Studio makes VSCode the BEST developer environment for building Progressive Web Apps. | /apps/pwabuilder-vscode | PWA Studio docs | Wiki |
| PWA Starter | Our opinionated and production tested progressive web app (PWA) template for creating new projects. | Repo | PWA Starter docs | Wiki |
| Docs | Source | Contribute |
|---|---|---|
| docs.pwabuilder.com | /docs | Wiki |
| blog.pwabuilder.com | /apps/blog | /apps/blog |
| Components | Overview | Source | Docs | Contribute |
|---|---|---|---|---|
<pwa-install> | Web component for great PWA install experience | pwa-install | pwa-install | Wiki |
You will need the following things properly installed on your computer.
You should also be familiar with TypeScript which we use for this project. This helps give you more guidance as you code from intellisense when using VSCode.
We recommend the following tools for your dev setup:
Additionally, when you open the project in VS Code, you'll be prompted to install recommended extensions.
Set the NODE_BIN environment variable, .vscode/launch.json for VS code and apps\pwabuilder\Properties\launchSettings.json for Visual Studio:
C:/Program Files/nodejs/node.exe/usr/local/bin/node/usr/bin/nodeUsing VS Code (App and API)
VSCode Run and Debug (F5 key) to build the project and start a local Edge browser.Using Visual Studio (API only)
https profile (F5 key)Alternatively, build the Dockerfile.production container and access it from http://localhost:8080
The web app, Microsoft Store, and Google Play deployment workflows publish uniquely tagged
images containing the commit SHA, workflow run ID, and run attempt. Each workflow
deploys the digest captured from its pushed image, not a mutable :production
or :latest tag. This prevents a subsequent preview build from changing the
image a deployed slot pulls on restart or scale-out.
Promote the tested image by swapping slots or deploying its exact digest. Existing production slots using mutable tags must be pinned separately to their verified known-good digests; changing these workflows does not update live slots. Retain images referenced by deployed slots and images needed for rollback. Breaking web app and Google Play API changes still require coordinated releases.
Pushes to main deploy changed services to their existing shared slots:
pwabuilder/preview, pwabuilder-windows-docker/staging, and
pwabuilder-cloudapk/staging. Manual packager workflow runs also use their shared
slots. The web app deploys to shared preview only on a push to main (including
PR merges); manual web workflow runs build an image but do not deploy it.
PRs targeting main from branches in this repository instead create or update
pr-<number> slots on the affected apps. Fork PRs are skipped before any build
or Azure login. The deployed slot URLs appear in workflow run summaries and
GitHub's staging environment deployment records. After deployment, a separate
job refreshes a PR deployments section of the PR description with successful
service links for that commit. Hidden pwabuilder-pr-deployments:start and
pwabuilder-pr-deployments:end markers delimit the managed section; text outside
those markers is preserved. Publishing jobs share a per-PR concurrency lock and
collect all successful service deployments so concurrent builds do not lose links.
Only publishing receives pull-requests: write; Azure deployment retains read
access. Failed, closed, superseded, and fork PR deployments do not publish links.
The three service workflows retain their own builds and call deploy-pr-slot.yml
for PR deployment. delete-pr-slots.yml handles both merged and unmerged closed
PRs, without path filters, and executes only the trusted default branch.
Cleanup checks all three apps and tolerates missing slots, but reports Azure
errors. Deploy and cleanup jobs share a per-app/PR concurrency lock and recheck
the current PR state; obsolete builds are skipped, late builds clean up closed
PRs, and cleanup skips reopened PRs. A reopened PR gets a fresh deployment.
If cleanup fails or is cancelled, rerun the cleanup workflow run.
Before enabling PR deployments, configure Azure and GitHub:
AZURE_WESTUS3_APP_ID handles the web app,
AZURE_EASTUS_APP_ID handles Microsoft Store, and AZURE_CENTRALUS_APP_ID
handles Google Play. The existing AZURE_WESTUS_APP_ID build identity still
pushes packager images to ACR. Subscription and tenant secrets are unchanged.repository_owner_id:11843769:repository_id:33142199:ref:refs/heads/main or
repository_owner_id:11843769:repository_id:33142199:pull_request;
PR deployments and cleanup use
repository_owner_id:11843769:repository_id:33142199:environment:staging.
The existing Azure identities already trust these required subjects.
The web deployment identity pwabuilder-managed-id-west-us-3 explicitly trusts
the staging-environment subject for PR deployment and cleanup; its existing
main and PR-build credentials are preserved.
Keep any GitHub staging environment protection rules compatible with PR
deployments and cleanup. Required approval rules also delay slot deletion.AZURE_CLIENT_ID, and fills an empty
AppSettings__AzureManagedIdentityApplicationId with that client ID.
It rejects system-only or ambiguous identity configurations. Existing source
slots retain their original identity selections.The web PR slot retains the preview slot's packaging endpoints. It does not automatically route to matching PR packager slots, and the existing Android endpoint allowlist is unchanged. Packager PR slots can be tested directly. Never swap a PR slot into production. Deleting a slot does not delete its ACR images; apply an image retention policy that preserves deployed and rollback digests.
Run the slot lifecycle regression checks with
pwsh -NoProfile -File .github/scripts/tests/test-pr-slot.ps1.
They simulate Azure and GitHub responses without changing cloud resources.
Run PR-description publishing tests with
node --test .github/scripts/tests/test-pr-deployment-links.cjs.
All files on the PWABuilder repository are subject to the MIT license. Please read the License file at the root of the project.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
pwabuilder-managed-id-east-uspwabuilder-cosmosdbPWABuilder/PWABuilderPackages