Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit b684808

Browse files
amcdnljelbourn
authored andcommitted
feat(PWA): add service worker #175 (#223)
1 parent ec7c637 commit b684808

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

angular-cli.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"test": "test.ts",
1717
"tsconfig": "tsconfig.json",
1818
"prefix": "app",
19-
"mobile": false,
19+
"serviceWorker": true,
2020
"styles": [
2121
"main.scss",
2222
"highlightjs/material-light.css",

ngsw-manifest.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"external": {
3+
"urls": [
4+
{"url": "https://fonts.googleapis.com/icon?family=Material+Icons"},
5+
{"url": "https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono"},
6+
{"url": "https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"},
7+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"}
8+
]
9+
}
10+
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"test": "ng test",
1010
"pree2e": "webdriver-manager update",
1111
"e2e": "protractor",
12+
"fetch-local": "bash ./tools/fetch-assets-local.sh",
1213
"build-themes": "bash ./tools/build-themes.sh",
13-
"prod-build": "npm run build-themes && ng build --aot --prod && npm run prerender && cp -r tmp/prerendered/* dist/",
14+
"prod-build": "npm run build-themes && ng build --aot --prod",
1415
"postinstall": "webdriver-manager update && bash ./tools/fetch-assets.sh",
1516
"publish-prod": "npm run build-themes && ng build --aot --prod && firebase use material-angular-io && firebase deploy",
1617
"publish-dev": "npm run build-themes && ng build --aot --prod && firebase use material2-docs-dev && firebase deploy"
@@ -28,6 +29,7 @@
2829
"@angular/platform-browser": "^4.0.0",
2930
"@angular/platform-browser-dynamic": "^4.0.0",
3031
"@angular/router": "^4.0.0",
32+
"@angular/service-worker": "^1.0.0-beta.16",
3133
"core-js": "^2.4.1",
3234
"rxjs": "^5.1.0",
3335
"zone.js": "^0.8.4"

src/assets/img/favicons/manifest.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
2-
"name": "Angular.io",
2+
"name": "Angular Material",
3+
"short_name": "Angular Material",
4+
"theme_color": "#FFFFFF",
5+
"background_color": "#3F51B5",
6+
"start_url": "/",
7+
"display": "standalone",
8+
"orientation": "portrait",
39
"icons": [
410
{
511
"src": "\/android-chrome-36x36.png",

0 commit comments

Comments
 (0)