docs(service-worker): fix the `service-worker-getting-started` docs example (#28020)
Changes: - Change the project type to `service-worker`, so that it gets appropriate `package.json` (with `@angular/service-worker` dependency) and `angular.json` (with `serviceWorker: true` in production config). - Move `ngsw-config.json` to the correct directory. - Specify custom test commands for aio's `yarn example-e2e` to also verify that the ServiceWorker bits are set up correctly. PR Close #28020
This commit is contained in:
parent
76104f395f
commit
12f509c218
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"projectType": "service-worker",
|
||||
"e2e": [
|
||||
{"cmd": "yarn", "args": ["e2e", "--no-webdriver-update"]},
|
||||
{"cmd": "yarn", "args": ["build", "--prod"]},
|
||||
{"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw.json'), 'ngsw.json is missing')"]},
|
||||
{"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw-worker.js'), 'ngsw-worker.js is missing')"]},
|
||||
{"cmd": "node", "args": ["--eval", "assert(require('./package.json').dependencies['@angular/service-worker'], '@angular/service-worker is missing')"]}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue