16 Commits

Author SHA1 Message Date
George Kalpakas
d368fa2fa4 fix(docs-infra): avoid unnecessarily loading Custom Elements ES5 shim ()
The custom elements spec is not compatible with ES5 style classes. This
means ES2015 code compiled to ES5 will not work with a native
implementation of Custom Elements. To support browsers that natively
support Custom Elements but not ES2015 modules, we load
`@webcomponents/custom-elements/src/native-shim.js`, which minimally
augments the native implementation to be compatible with ES5 code.
(See [here][1] for more details.)

Previously, the shim was included in `polyfills.ts`, which meant it was
loaded in all browsers (even those supporting ES2015 modules and thus
not needing the shim).

This commit moves the shim from `polyfills.ts` to a `nomodule` script
tag in `index.html`. This will ensure that it is only loaded in browsers
that do not support ES2015 modules and thus do not needed the shim.

NOTE:
This commit also reduces size of the polyfills bundle by ~400B
(52609B --> 52215B).

[1]: https://www.npmjs.com/package/@webcomponents/custom-elements#es5-vs-es2015

PR Close 
2021-03-11 09:25:32 -08:00
George Kalpakas
21f0deeaa6 build(docs-infra): update Angular framework, Material and CLI to latest methods ()
This commit updates the Angular framework, Angular CDK/Material and
Angular CLI to latest stable versions (11.2.3, 11.2.2 and 11.2.2
respectively).

This update also fixes a Lighthouse audit fail due to
`@angular/core@11.0.0` being identified as vulnerable to XSS:
https://snyk.io/vuln/SNYK-JS-ANGULARCORE-1070902

Regarding the payload size increases, they are mostly attributed to
Angular Material:
- Before this commit:     448461 B
- After framework update: 448554 B ( +93 B)
- After Material update:  449292 B (+738 B)
- After CLI update:       449310 B ( +18 B)

PR Close 
2021-03-03 09:43:56 -08:00
Alan Agius
d51d39cb4c docs: update docs to use new zone.js entry-points ()
In CLI version 12, the old style of imports is no longer supported.

PR Close 
2021-02-24 07:58:29 -08:00
Andrew Kushnir
8fd25d9614 docs: remove IE10 references from comments in the code ()
PR Close 
2020-10-13 15:51:49 -07:00
George Kalpakas
a468f11c7c build(docs-infra): update @angular/cli to 10.0.0-next.3 ()
Update the Angular CLI and Angular framework packages to latest `@next`
versions. Also, update the app to look more closely to how a newly
generated app with the latest CLI would look like.

PR Close 
2020-05-05 11:50:29 -07:00
George Kalpakas
2002db28ff build(docs-infra): remove obsolete ie-polyfills.js ()
Now that defferential loading it supported by the cli, remove the
obsolete `ie-polyfills.js` (and associated dependencies).

All polyfills in `ie-polyfills.js` are now included in the
[polyfills-es5][1] bundle, except for `classlist.js`, that is only
needed in order to support `NgClass` on SVG elements, which we don't
use.

[1]: https://github.com/angular/angular-cli/blob/b95933a57/packages/angular_devkit/build_angular/src/angular-cli-files/models/es5-polyfills.js

PR Close 
2019-04-25 12:32:49 -07:00
Rob Wormald
59aab14394 refactor(docs-infra): simplify custom-element polyfill setup ()
PR Close 
2018-09-05 09:23:10 -07:00
Igor Minar
7493435911 test(aio): move reflect-metadata polyfills to test.ts ()
This resolves https://github.com/angular/angular-cli/issues/10333 and nicely cleans up the code.

PR Close 
2018-04-17 14:09:02 -07:00
Andrew Seguin
cf3ff7d219 feat(elements): another polyfill solution ()
PR Close 
2018-03-16 12:39:07 -07:00
Andrew Seguin
87f60bccfd feat(elements): injector create ()
PR Close 
2018-03-16 12:39:07 -07:00
Andrew Seguin
863aff1a77 feat(elements): add polyfill for elements es5 shim ()
PR Close 
2018-03-16 12:39:07 -07:00
Andrew Seguin
7c9b411777 feat(aio): migrate embedded comp to elements ()
PR Close 
2018-03-16 12:39:07 -07:00
Peter Bacon Darwin
be9e8b99ff fix(aio): support IE via conditionally loaded polyfills
Closes 
2017-05-19 11:26:29 +01:00
Igor Minar
47c72e4627 perf(aio): load reflect-metadata polyfill only in the dev mode 2017-05-18 15:48:49 +01:00
Igor Minar
9e5d4781cb refactor(aio): cleanup polyfill imports and realign them with the latest cli blueprint
This shouldn't change anything. But it's interesting that we used to have this  import
that seemed bogus, but there were no compilation or rutime errors.
2017-03-21 15:20:28 -05:00
Pete Bacon Darwin
600402d440 build(aio): big move of docs related files ()
All the docs related files (docs-app, doc-gen, content, etc)
are now to be found inside the `/aio` folder.

The related gulp tasks have been moved from the top level
gulp file to a new one inside the `/aio` folder.

The structure of the `/aio` folder now looks like:

```
/aio/
  build/         # gulp tasks
  content/       #MARKDOWN FILES for devguides, cheatsheet, etc
    devguides/
    cheatsheets/
  transforms/    #dgeni packages, templates, etc
  src/
    app/
    assets/
    content/    #HTML + JSON build artifacts produced by dgeni from /aio/content.
                #This dir is .gitignored-ed
  e2e/           #protractor tests for the doc viewer app
  node_modules/ #dependencies for both the doc viewer builds and the dgeni stuff
                #This dir is .gitignored-ed
  gulpfile.js   #Tasks for generating docs and building & deploying the doc viewer
```

Closes 
2017-02-09 11:58:36 -08:00