docs(service-worker): fix paths for ngsw-config command to match latest CLI (#34215)

PR Close #34215
This commit is contained in:
George Kalpakas 2019-12-03 18:47:21 +02:00 committed by Miško Hevery
parent 671deadde1
commit 86d5472d91

View File

@ -7,16 +7,17 @@ A basic understanding of the following:
<hr /> <hr />
The `src/ngsw-config.json` configuration file specifies which files and data URLs the Angular The `ngsw-config.json` configuration file specifies which files and data URLs the Angular service
service worker should cache and how it should update the cached files and data. The worker should cache and how it should update the cached files and data. The [Angular CLI](cli)
[Angular CLI](cli) processes the configuration file during `ng build --prod`. Manually, you can process processes the configuration file during `ng build --prod`. Manually, you can process it with the
it with the `ngsw-config` tool: `ngsw-config` tool (where `<project-name>` is the name of the project being built):
```sh <code-example language="sh">
ngsw-config dist src/ngsw-config.json /base/href ./node_modules/.bin/ngsw-config ./dist/&lt;project-name&gt; ./ngsw-config.json [/base/href]
``` </code-example>
The configuration file uses the JSON format. All file paths must begin with `/`, which is the deployment directory&mdash;usually `dist` in CLI projects. The configuration file uses the JSON format. All file paths must begin with `/`, which corresponds
to the deployment directory&mdash;usually `dist/<project-name>` in CLI projects.
{@a glob-patterns} {@a glob-patterns}
Unless otherwise noted, patterns use a limited glob format: Unless otherwise noted, patterns use a limited glob format: