Skip to content

Commit

Permalink
docs: add README to @angular/pwa.
Browse files Browse the repository at this point in the history
This mostly just copies the "Getting started with service workers" guide cited to explain what the schematic itself does and defering to that doc for more info on PWA's and how to actually build one.

(cherry picked from commit d09da29)
  • Loading branch information
dgp1130 authored and clydin committed Apr 14, 2021
1 parent 63e6b76 commit 27a94f0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/angular/pwa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# `@angular/pwa`

This is a [schematic](https://angular.io/guide/schematics) for adding
[Progress Web App](https://web.dev/progressive-web-apps/) support to an Angular app. Run the
schematic with the [Angular CLI](https://angular.io/cli):

```shell
ng add @angular/pwa
```

This makes a few changes to your project:

1. Adds [`@angular/service-worker`](https://npmjs.com/@angular/service-worker) as a dependency.
1. Enables service worker builds in the Angular CLI.
1. Imports and registers the service worker in the app module.
1. Adds a [web app manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest).
1. Updates the `index.html` file to link to the manifest and set theme colors.
1. Adds required icons for the manifest.
1. Creates a config file `ngsw-config.json`, specifying caching behaviors and other settings.

See [Getting started with service workers](https://angular.io/guide/service-worker-getting-started)
for more information.

0 comments on commit 27a94f0

Please sign in to comment.