Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
5ddc010
test(docs-infra): correctly extract sitemap URLs
gkalpak May 24, 2018
803d169
feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0.
alxhub Nov 28, 2017
7e9e472
fixup! feat(docs-infra): Convert AIO to use the new Service Worker 5.…
gkalpak Jul 23, 2018
b5291c2
fixup! feat(docs-infra): Convert AIO to use the new Service Worker 5.…
gkalpak Aug 23, 2018
8f18059
refactor(docs-infra): remove unused images
gkalpak May 2, 2018
6e2e11e
refactor(docs-infra): move concept icons to more appropriate location
gkalpak May 24, 2018
6ba6bc6
fix(docs-infra): correctly show icon for fetch error when offline
gkalpak May 24, 2018
9f69609
build(docs-infra): enable ServiceWorker in cli config
gkalpak Apr 18, 2018
6922a63
build(docs-infra): remove the dependency on `rxjs-compat`
gkalpak Apr 18, 2018
9ada37b
build(docs-infra): remove unused dependencies
gkalpak Apr 18, 2018
63eb0ad
build(docs-infra): upgrade @angular/cli to 6.0.3
gkalpak May 18, 2018
515178b
build(docs-infra): upgrade @angular/* to 6.0.2 and rxjs to 6.1.0
gkalpak May 18, 2018
6e41f61
build(docs-infra): upgrade @angular/material to 6.0.2
gkalpak May 18, 2018
8293cfe
build(docs-infra): update size limits
gkalpak Jul 12, 2018
146de97
build(docs-infra): upgrade @angular/cli to 6.1.0-rc.3 and @angular-de…
gkalpak Jul 22, 2018
3df2e77
build(docs-infra): upgrade @angular/* to 6.1.0-rc.3 and rxjs to 6.2.2
gkalpak Jul 22, 2018
c36774f
build(docs-infra): update size limits
gkalpak Jul 22, 2018
323afdf
build(docs-infra): downgrade @angular-devkit/build-angular to 0.6.7
gkalpak Jul 23, 2018
0832d58
fix(docs-infra): ignore server-side redirected URLs in the SW
gkalpak May 24, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions aio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Here are the most important tasks you might need to use:
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
* `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console.
* `yarn lint` - check that the doc-viewer code follows our style rules.
* `yarn test` - run all the unit tests once.
* `yarn test --watch` - watch all the source files, for the doc-viewer, and run all the unit tests when any change.
* `yarn test` - watch all the source files, for the doc-viewer, and run all the unit tests when any change.
* `yarn test --watch=false` - run all the unit tests once.
* `yarn e2e` - run all the e2e tests for the doc-viewer.

* `yarn docs` - generate all the docs from the source files.
Expand Down Expand Up @@ -56,14 +56,9 @@ It's necessary to remove the temporary files, because otherwise they're displaye

## Using ServiceWorker locally

Since abb36e3cb, running `yarn start --prod` will no longer set up the ServiceWorker, which
would require manually running `yarn sw-manifest` and `yarn sw-copy` (something that is not possible
with webpack serving the files from memory).

If you want to test ServiceWorker locally, you can use `yarn build` and serve the files in `dist/`
with `yarn http-server dist -p 4200`.

For more details see #16745.
Running `yarn start` (even when explicitly targeting production mode) does not set up the
ServiceWorker. If you want to test the ServiceWorker locally, you can use `yarn build` and then
serve the files in `dist/` with `yarn http-server dist -p 4200`.


## Guide to authoring
Expand Down
11 changes: 6 additions & 5 deletions aio/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"src/assets",
"src/generated",
"src/app/search/search-worker.js",
"src/favicon.ico",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how come we no longer need to deal with favicon.ico?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't been using this favicon for a while (so I deleted it).
We use another favicon instead.

"src/pwa-manifest.json",
"src/google385281288605d160.html",
{
Expand Down Expand Up @@ -62,23 +61,26 @@
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.next.ts"
}
]
],
"serviceWorker": true
},
"stable": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.stable.ts"
}
]
],
"serviceWorker": true
},
"archive": {
"fileReplacements": [
{
"src": "src/environments/environment.ts",
"replaceWith": "src/environments/environment.archive.ts"
}
]
],
"serviceWorker": true
}
}
},
Expand Down Expand Up @@ -123,7 +125,6 @@
"src/assets",
"src/generated",
"src/app/search/search-worker.js",
"src/favicon.ico",
"src/pwa-manifest.json",
"src/google385281288605d160.html",
{
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed aio/content/images/marketing/home/ng-atl.png
Diff not rendered.
Binary file removed aio/content/images/marketing/home/ng-conf.png
Diff not rendered.
132 changes: 66 additions & 66 deletions aio/content/marketing/presskit.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion aio/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//////////////////////////////////////////////////////////////////////////////////////////////
// README:
// Redirects must also be handled by the ServiceWorker. If you add a redirect rule here,
// make sure the routing RegExp in `ngsw-manifest.json` is updated accordingly.
// make sure it is compatible with the configuration in `ngsw-config.json`.
//////////////////////////////////////////////////////////////////////////////////////////////

// A random bad indexed page that used `api/api`
Expand Down
128 changes: 128 additions & 0 deletions aio/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"index": "/index.html",
"assetGroups": [
{
"name": "app-shell",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/index.html",
"/pwa-manifest.json",
"/app/search/search-worker.js",
"/assets/images/favicons/favicon.ico",
"/assets/js/*.js",
"/*.css",
"/*.js"
],
"urls": [
"https://fonts.googleapis.com/**",
"https://fonts.gstatic.com/s/**",
"https://maxcdn.bootstrapcdn.com/**"
]
}
}, {
"name": "assets-eager",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/images/**",
"/generated/images/marketing/**",
"!/assets/images/favicons/**",
"!/**/_unused/**"
]
}
}, {
"name": "assets-lazy",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/images/favicons/**",
"/generated/ie-polyfills.min.js",
"!/**/_unused/**"
]
}
}, {
"name": "docs-index",
"installMode": "prefetch",
"updateMode": "prefetch",
"resources": {
"files": [
"/generated/*.json",
"/generated/docs/*.json",
"/generated/docs/api/api-list.json",
"/generated/docs/app/search-data.json"
]
}
}, {
"name": "docs-lazy",
"installMode": "lazy",
"updateMode": "lazy",
"resources": {
"files": [
"/generated/docs/**/*.json",
"/generated/images/**",
"!/**/_unused/**"
]
}
}
],
"navigationUrls": [
"/**",
"!/**/*.*",
"!/**/*__*",
"!/**/*__*/**",
"!/**/stackblitz",
"!/**/stackblitz.html",
"!/api/*/**/*-*",
"!/api/**/AnimationStateDeclarationMetadata*",
"!/api/**/CORE_DIRECTIVES*",
"!/api/**/DirectiveMetadata*",
"!/api/**/HTTP_PROVIDERS*",
"!/api/**/NgFor",
"!/api/**/NgFor-*",
"!/api/**/PLATFORM_PIPES*",
"!/api/animate/**",
"!/api/api/**",
"!/api/common/Control*",
"!/api/common/MaxLengthValidator*",
"!/api/common/NgModel*",
"!/api/platform-browser/AnimationDriver*",
"!/api/testing/**",
"!/docs/?*",
"!/docs/*/**",
"!/guide/cli-quickstart",
"!/guide/cli-quickstart.html",
"!/guide/cli-quickstart/",
"!/guide/learning-angular",
"!/guide/learning-angular.html",
"!/guide/learning-angular/",
"!/guide/metadata",
"!/guide/metadata.html",
"!/guide/metadata/",
"!/guide/ngmodule",
"!/guide/ngmodule.html",
"!/guide/ngmodule/",
"!/guide/service-worker-getstart",
"!/guide/service-worker-getstart.html",
"!/guide/service-worker-getstart/",
"!/guide/service-worker-comm",
"!/guide/service-worker-comm.html",
"!/guide/service-worker-comm/",
"!/guide/service-worker-configref",
"!/guide/service-worker-configref.html",
"!/guide/service-worker-configref/",
"!/guide/webpack",
"!/guide/webpack.html",
"!/guide/webpack/",
"!/news",
"!/news.html",
"!/news/",
"!/styleguide",
"!/styleguide/**",
"!/testing",
"!/testing/**"
]
}
26 changes: 0 additions & 26 deletions aio/ngsw-manifest.json

This file was deleted.

48 changes: 21 additions & 27 deletions aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"preinstall": "node ../tools/yarn/check-yarn.js",
"postinstall": "node tools/cli-patches/patch.js && uglifyjs node_modules/lunr/lunr.js -c -m -o src/assets/js/lunr.min.js --source-map",
"aio-use-local": "node tools/ng-packages-installer overwrite . --debug --ignore-packages @angular/service-worker",
"aio-use-local": "node tools/ng-packages-installer overwrite . --debug",
"aio-use-npm": "node tools/ng-packages-installer restore .",
"aio-check-local": "node tools/ng-packages-installer check .",
"ng": "yarn check-env && ng",
Expand Down Expand Up @@ -55,51 +55,44 @@
"boilerplate:test": "node tools/examples/test.js",
"generate-stackblitz": "node ./tools/stackblitz-builder/generateStackblitz",
"generate-zips": "node ./tools/example-zipper/generateZips",
"sw-manifest": "ngu-sw-manifest --dist dist --in ngsw-manifest.json --out dist/ngsw-manifest.json",
"sw-copy": "cp node_modules/@angular/service-worker/bundles/worker-basic.min.js dist/",
"build-404-page": "node scripts/build-404-page",
"build-ie-polyfills": "yarn webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
"update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
"~~check-env": "node scripts/check-environment",
"~~build": "ng build",
"post~~build": "yarn build-404-page && yarn sw-manifest && yarn sw-copy"
"post~~build": "yarn build-404-page"
},
"engines": {
"node": ">=8.9.1 <9.0.0",
"yarn": ">=1.3.2 <2.0.0"
},
"private": true,
"dependencies": {
"@angular/animations": "6.0.0",
"@angular/cdk": "6.0.0",
"@angular/common": "6.0.0",
"@angular/core": "6.0.0",
"@angular/elements": "6.0.0",
"@angular/forms": "6.0.0",
"@angular/http": "6.0.0",
"@angular/material": "6.0.0",
"@angular/platform-browser": "6.0.0",
"@angular/platform-browser-dynamic": "6.0.0",
"@angular/platform-server": "6.0.0",
"@angular/router": "6.0.0",
"@angular/service-worker": "^1.0.0-beta.16",
"@angular/animations": "6.1.0-rc.3",
"@angular/cdk": "6.0.2",
"@angular/common": "6.1.0-rc.3",
"@angular/core": "6.1.0-rc.3",
"@angular/elements": "6.1.0-rc.3",
"@angular/forms": "6.1.0-rc.3",
"@angular/material": "6.0.2",
"@angular/platform-browser": "6.1.0-rc.3",
"@angular/platform-browser-dynamic": "6.1.0-rc.3",
"@angular/router": "6.1.0-rc.3",
"@angular/service-worker": "6.1.0-rc.3",
"@webcomponents/custom-elements": "^1.0.8",
"classlist.js": "^1.1.20150312",
"core-js": "^2.4.1",
"jasmine": "^2.6.0",
"ng-pwa-tools": "^0.0.10",
"rxjs": "6.0.0-uncanny-rc.7",
"rxjs-compat": "6.0.0-uncanny-rc.7",
"rxjs": "6.2.2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should now be able to drop rxjs-compat as well. can you send a follow up PR for that plz?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm dropping it in this PR 😁

"tslib": "^1.9.0",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.6.0",
"@angular/cli": "^6.0.0",
"@angular/compiler": "6.0.0",
"@angular/compiler-cli": "6.0.0",
"@angular/language-service": "6.0.0",
"@angular-devkit/build-angular": "0.6.7",
"@angular/cli": "^6.1.0-rc.3",
"@angular/compiler": "6.1.0-rc.3",
"@angular/compiler-cli": "6.1.0-rc.3",
"@angular/language-service": "6.1.0-rc.3",
"@types/jasmine": "^2.5.52",
"@types/jasminewd2": "^2.0.3",
"@types/node": "~6.0.60",
Expand All @@ -125,6 +118,7 @@
"http-server": "^0.9.0",
"ignore": "^3.3.3",
"image-size": "^0.5.1",
"jasmine": "^2.6.0",
"jasmine-core": "^2.8.0",
"jasmine-marbles": "^0.3.1",
"jasmine-spec-reporter": "^4.1.0",
Expand All @@ -150,7 +144,7 @@
"tree-kill": "^1.1.0",
"ts-node": "^3.3.0",
"tslint": "~5.9.1",
"typescript": "~2.7.2",
"typescript": "^2.9.2",
"uglify-js": "^3.0.15",
"unist-util-filter": "^0.2.1",
"unist-util-source": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion aio/scripts/_payload-limits.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"master": {
"uncompressed": {
"runtime": 2768,
"main": 475855,
"main": 476338,
"polyfills": 38453,
"prettify": 14913
}
Expand Down
Loading