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
a80fc96
feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0.
alxhub Nov 28, 2017
62adffb
refactor(docs-infra): remove unused images
gkalpak May 2, 2018
41922aa
refactor(docs-infra): move concept icons to more appropriate location
gkalpak May 24, 2018
ccd0291
fix(docs-infra): correctly show icon for fetch error when offline
gkalpak May 24, 2018
7c6acc9
build(docs-infra): enable ServiceWorker in cli config
gkalpak Apr 18, 2018
8993150
build(docs-infra): remove the dependency on `rxjs-compat`
gkalpak Apr 18, 2018
19fa9d2
build(docs-infra): remove unused dependencies
gkalpak Apr 18, 2018
aaa4b9e
build(docs-infra): upgrade @angular/cli to 6.0.3
gkalpak May 18, 2018
2b20689
build(docs-infra): upgrade @angular/* to 6.0.2 and rxjs to 6.1.0
gkalpak May 18, 2018
d8d7bf8
build(docs-infra): upgrade @angular/material to 6.0.2
gkalpak May 18, 2018
2176234
build(docs-infra): upgrade @angular/cli to 6.1.0-rc.3 and @angular-de…
gkalpak Jul 22, 2018
0d52045
build(docs-infra): upgrade @angular/* to 6.1.0-rc.3 and rxjs to 6.2.2
gkalpak Jul 22, 2018
6fdca0f
build(docs-infra): downgrade @angular-devkit/build-angular to 0.6.7
gkalpak Jul 23, 2018
86f7e46
fix(docs-infra): ignore server-side redirected URLs in the SW
gkalpak May 24, 2018
59d3ef8
build(docs-infra): update size limits
gkalpak Sep 18, 2018
f29d82e
fix(docs-infra): configure Firebase to strip off the `.html` extensio…
gkalpak Sep 18, 2018
b16466d
build(docs-infra): update payload size limits to reflect current stat…
gkalpak Sep 27, 2018
6fc50e7
build(docs-infra): upgrade @angular/* to 7.0.0-beta.7 (#26145)
gkalpak Sep 27, 2018
2b8f6b9
build(docs-infra): upgrade @angular/cli to 6.2.3 (#26145)
gkalpak Sep 27, 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",
"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.

9 changes: 7 additions & 2 deletions 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 Expand Up @@ -104,7 +104,12 @@
{"type": 301, "source": "/guide/ngmodule", "destination": "/guide/ngmodules"},
{"type": 301, "source": "/guide/learning-angular*", "destination": "/guide/quickstart"},
{"type": 301, "source": "/testing", "destination": "/guide/testing"},
{"type": 301, "source": "/testing/**", "destination": "/guide/testing"}
{"type": 301, "source": "/testing/**", "destination": "/guide/testing"},

// Strip off the `.html` extension, because Firebase will not do this automatically any more
// (unless the new URL points to an existing file, which is not necessarily the case here).
{"type": 301, "source": "/:somePath*/:file.html", "destination": "/:somePath*/:file"},
{"type": 301, "source": "/:topLevelFile.html", "destination": "/:topLevelFile"}
],
"rewrites": [
{
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 @@ -56,52 +56,45 @@
"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",
"~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"",
"~~build": "ng build",
"post~~build": "yarn build-404-page && yarn sw-manifest && yarn sw-copy"
"post~~build": "yarn build-404-page"
},
"engines": {
"node": ">=10.9.0 <11.0.0",
"yarn": ">=1.9.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": "^7.0.0-beta.7",
"@angular/cdk": "6.0.2",
"@angular/common": "^7.0.0-beta.7",
"@angular/core": "^7.0.0-beta.7",
"@angular/elements": "^7.0.0-beta.7",
"@angular/forms": "^7.0.0-beta.7",
"@angular/material": "6.0.2",
"@angular/platform-browser": "^7.0.0-beta.7",
"@angular/platform-browser-dynamic": "^7.0.0-beta.7",
"@angular/router": "^7.0.0-beta.7",
"@angular/service-worker": "^7.0.0-beta.7",
"@webcomponents/custom-elements": "^1.2.0",
"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",
"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.8.3",
"@angular/cli": "^6.2.3",
"@angular/compiler": "^7.0.0-beta.7",
"@angular/compiler-cli": "^7.0.0-beta.7",
"@angular/language-service": "^7.0.0-beta.7",
"@types/jasmine": "^2.5.52",
"@types/jasminewd2": "^2.0.3",
"@types/node": "~6.0.60",
Expand All @@ -127,6 +120,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 @@ -152,7 +146,7 @@
"tree-kill": "^1.1.0",
"ts-node": "^3.3.0",
"tslint": "~5.9.1",
"typescript": "~2.7.2",
"typescript": "3.0",
"uglify-js": "^3.0.15",
"unist-util-filter": "^0.2.1",
"unist-util-source": "^1.0.1",
Expand Down
8 changes: 4 additions & 4 deletions aio/scripts/_payload-limits.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"aio": {
"master": {
"uncompressed": {
"runtime": 2768,
"main": 476338,
"polyfills": 53922,
"runtime": 3173,
"main": 483270,
"polyfills": 53920,
"prettify": 14913
}
}
}
}
}
Loading