Commit Graph

5661 Commits

Author SHA1 Message Date
YuCheng Hu feb445e65b 测试中文化编译 2021-08-11 09:47:39 -04:00
YuCheng Hu 08531986c5 删除不使用 target 2021-08-11 09:31:25 -04:00
YuCheng Hu b60cd3e94a 从官方版本合并到本地 2021-08-10 19:26:23 -04:00
YuCheng Hu 4170a90ac7 Merge remote-tracking branch 'origin/master' into angular.ossez.com 2021-08-10 19:00:29 -04:00
Tim Gates e3415e597e docs: Fix a few typos (#43051)
There are small typos in:
- aio/content/guide/universal.md
- aio/content/guide/upgrade.md
- aio/content/guide/workspace-config.md
- dev-infra/ng-dev.js
- integration/check-dependencies.js

Fixes:
- Should read `mergeable` rather than `mergable`.
- Should read `upgradeable` rather than `upgradable`.
- Should read `thresholds` rather than `threshholds`.
- Should read `lease` rather than `leage`.
- Should read `ignore` rather than `ingore`.
- Should read `bootstrapping` rather than `bootstraping`.

PR Close #43051
2021-08-10 11:59:29 -07:00
Erik Slack 596d533f97 docs: add angular community meetup and ngxp to community resources (#43103)
Invite people to get more involved with Angular's community via these

PR Close #43103
2021-08-10 11:56:22 -07:00
Amadou Sall 002d959fe5 docs: remove the mention of Stylus (#43013)
Stylus is not supported anymore by Angular, so it should be removed from the Angular docs

PR Close #43013
2021-08-10 11:55:35 -07:00
George Kalpakas 892bd929f2 build(docs-infra): upgrade cli command docs sources to a52ca2236 (#43093)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](cf835b898...a52ca2236):

**Modified**
- help/generate.json

PR Close #43093
2021-08-10 10:33:30 -07:00
George Kalpakas 6c3ad1f1a4 fix(docs-infra): correctly detect chunk load errors (#43088)
It seems that at some point (potentially with the switch to Webpack 5)
Webpack started using the full chunk name (instead of just a numeric
identifier) in `ChunkLoadError` messages. So the error messages changed
from:
```
ChunkLoadError: Loading chunk 2 failed.
```

...to:
```
ChunkLoadError: Loading chunk src_app_something_some_module_ts failed.
```

This commit updates the regex that is used to detect such errors (in
order to print ServiceWorker-related debug info) to correctly recognize
the new error message format.

PR Close #43088
2021-08-09 12:25:41 -07:00
Jeroen van Warmerdam 04879a1007 docs: fix cli link (#43085)
PR Close #43085
2021-08-09 09:41:40 -07:00
George Kalpakas 93590895b5 build(docs-infra): update docs examples to Angular v12.1.3 (#42949)
This commit updates the docs examples to Angular v12.1.3. In addition to
updating the dependencies versions, it also updates the projects'
structure and configs to more closely match what a new v12 CLI app would
look like. See, also, the [diff][1] between a basic v11.2.11 CLI app and
a v12.1.3 one.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.11..12.1.3

PR Close #42949
2021-08-09 09:41:00 -07:00
George Kalpakas 14ebd82333 docs: fix typo in Compiler Options guide (#42949)
PR Close #42949
2021-08-09 09:41:00 -07:00
Fabien BERNARD 644f1b3924 docs: fix interval type in the example (#43042)
`window.setInterval` returns a `number`, let's fix this example.

PR Close #43042
2021-08-05 15:33:13 -07:00
George Kalpakas 3107988e6e build(docs-infra): upgrade cli command docs sources to cf835b898 (#43039)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](129d45cfa...cf835b898):

**Modified**
- help/build.json
- help/e2e.json
- help/serve.json

##
Relevant changes in
[commit range](edfd9b4ae...cf835b898) since PR #43024:

**Modified**
- help/build.json
- help/serve.json

##
Closes #43024

PR Close #43039
2021-08-04 12:14:25 -07:00
dario-piotrowicz f62366fd16 docs: amend links in content-projection guide (#43009)
PR Close #43009
2021-08-02 15:36:51 -07:00
George Kalpakas 5d8759b6a2 build(docs-infra): upgrade cli command docs sources to 129d45cfa (#43004)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](a57976b98...129d45cfa):

**Modified**
- help/generate.json
- help/new.json

PR Close #43004
2021-08-02 10:42:06 -07:00
Renovate Bot f31436da3c build: lock file maintenance (#42890)
PR Close #42890
2021-07-30 09:27:01 -07:00
Nichola Alkhouri 9e30824ef8 docs: Fix wrongly provided/Injected AnimalService (#42988)
In the logical tree example which demonstrate the use of `@SkipSelf` and  `@Host`, the provided and injected `AnimalService` are reversed.
PR Close #42988
2021-07-29 15:05:52 -07:00
Joe Martin 8ce1ac603a docs: Add josmar-crwdstffng to contributors list. (#42972)
Add josmar-crwdstffng to list in contributors.json.  Add josephmmartin
image file.

PR Close #42972
2021-07-28 15:56:00 -07:00
codebriefcase 63918d8642 docs: include interpolations in the "What is Angular" example (#42702)
Affected URL - https://angular.io/guide/what-is-angular#template

Fixes #42665

PR Close #42702
2021-07-28 10:53:32 -07:00
George Kalpakas 85e93c3833 fix(docs-infra): notify `ErrorHandler` of `UnrecoverableState` errors (#42941)
With this commit, the `ErrorHandler` is notified of ServiceWorker
`UnrecoverableState` errors. The main purpose of this change is
gathering info about the occurrence (and frequency) of such errors in
Google analytics.

PR Close #42941
2021-07-27 09:23:14 -07:00
Vladyslav b93c42eff3 docs: updated input-output page documentation content (#42964)
PR Close #42964
2021-07-27 09:22:19 -07:00
Yuvaraj 271700cbb6 docs: fix the selector in component interaction guide (#42891)
The selector for the `CountdownTimerComponent` is `app-countdown-timer`
not `countdown-timer`.

PR Close #42891
2021-07-26 11:47:55 -07:00
Renovate Bot 816ba07351 build: update dependency eslint-plugin-jsdoc to v36 (#42956)
PR Close #42956
2021-07-26 11:37:15 -07:00
Teri Glover 05d996d803 docs: Edits to remove jargon (#42861)
PR Close #42861
2021-07-23 17:12:50 -07:00
George Kalpakas 1f6cc57812 build(docs-infra): upgrade cli command docs sources to a57976b98 (#42943)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](18bbd044d...a57976b98):

**Modified**
- help/generate.json

PR Close #42943
2021-07-23 12:05:56 -07:00
Renovate Bot 648da4f8b5 build: update dependency globby to v12 (#42921)
PR Close #42921
2021-07-23 10:37:35 -07:00
George Kalpakas 19da73741d build(docs-infra): switch the `example-e2e` script to ESM (#42921)
Switch the JS script used for running the docs examples tests from
CommonJS to ESM format. This is necessary for upgrading the `globby`
dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42921
2021-07-23 10:37:35 -07:00
George Kalpakas 662addb355 build(docs-infra): switch the `generate-stackblitz/zips` scripts to ESM (#42921)
Switch the JS scripts used for generating StackBlitz projects and zips
from CommonJS to ESM format. This is necessary for upgrading the
`globby` dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42921
2021-07-23 10:37:35 -07:00
Pete Bacon Darwin 5d222f39d3 docs: fix spacing in code style guide (#42908)
Fixes #42906

PR Close #42908
2021-07-22 16:25:39 +00:00
Teri Glover b5f177939f docs: Edits to remove jargon (#42907)
PR Close #42907
2021-07-22 16:24:15 +00:00
George Kalpakas e2aa7652e5 fix(docs-infra): fix keyword color in CLI pages code blocks (#42889)
Previously, names of CLI commands that also happened to be keywords were
shown in black color in the code block demonstrating the command's
usage. This worked fine when in light mode (where the code block
background is white) but not in the recently introduced dark mode (where
the code block background is dark gray).

This commit fixes this by ensuring the `.kwd` token color is inherited
from its parent (which has an appropriate color for the current theme).
Previously, the `.kwd` token was reset to its initial value (which is
`black` regardless of the theme).

**Before:** ![CLI pages keyword before][1]
**After:** ![cli-pages-keyword after][2]

[1]: https://user-images.githubusercontent.com/8604205/126073803-af317f0c-d04f-4c3a-9a83-e92541d7dd5a.png
[2]: https://user-images.githubusercontent.com/8604205/126073806-1d57e3ed-90b1-4735-ae2a-d0a39862bb95.png

PR Close #42889
2021-07-20 11:56:33 -07:00
dario-piotrowicz ca7d4c3403 refactor(docs-infra): migrate aio from tslint to eslint (#42820)
migrate aio to eslint as tslint has been deprecated, the migration is restricted to the aio app and
its e2e tests and does not include the other tools, for such reason both tslint and codelyzer have not
been removed (to be done in a next PR)

some minor tweaks needed to be applied to the code so that it would adhere to the new ESLinting behaviour

most TSLint rules have been substituted with their ESLint equivalent, with some exceptions:
  * [whitespace] does not have an ESLint equivalent (suggested to be handled by prettier)
  * [import-spacing] does not have an ESLint equivalent (suggested to be handled by prettier)
  * [ban] replaced with [no-restricted-syntax] as there is no (official/included) ESLint equivalent

some rules have minor different behaviours compared to their TSLint counterparts:
  * @typescript-eslint/naming-convention:
    - typescript-eslint does not enforce uppercase for const only.
  * @typescript-eslint/no-unused-expressions:
    - The TSLint optional config "allow-new" is the default ESLint behavior and will no longer be ignored.
  * arrow-body-style:
    - ESLint will throw an error if the function body is multiline yet has a one-line return on it.
  * eqeqeq:
    - Option "smart" allows for comparing two literal values, evaluating the value of typeof and null comparisons.
  * no-console:
    - Custom console methods, if they exist, will no longer be allowed.
  * no-invalid-this:
    - Functions in methods will no longer be ignored.
  * no-underscore-dangle:
    - Leading and trailing underscores (_) on identifiers will now be ignored.
  * prefer-arrow/prefer-arrow-functions:
    - ESLint does not support allowing standalone function declarations.
    - ESLint does not support allowing named functions defined with the function keyword.
  * space-before-function-paren:
    - Option "constructor" is not supported by ESLint.
    - Option "method" is not supported by ESLint.

additional notes:
  * the current typescript version used by the aio app is 4.3.5, which is not supported by typescript-eslint (the supported
    versions are >=3.3.1 and <4.3.0). this causes a warning message to appear during linting, this issue should
    likely/hopefully disappear in the future as typescript-eslint catches up
  * The new "no-console" rule is not completely equivalent to what we had prior the migration, this is because TSLint's "no-console"
    rule let you specify the methods you did not want to allow, whilst ESLint's "no-console" lets you specify the methods that you do
    want to allow, so and in order not to have a very long list of methods in the ESLint rule it's been decided for the time being
    to simply only allow the "log", "warn" and "error" methods
  * 4 dependencies have been added as they have been considered necessary (see: https://github.com/angular/angular/pull/42820#discussion_r669978232)

extra:
  * the migration has been performed by following: https://github.com/angular-eslint/angular-eslint#migrating-an-angular-cli-project-from-codelyzer-and-tslin
  * more on typescript-eslint at: https://github.com/typescript-eslint/typescript-eslint

PR Close #42820
2021-07-20 11:55:28 -07:00
dario-piotrowicz 52dc65dd1b build(docs-infra): improve @usageNotes message (#42888)
improve the @usageNotes message by adding the word "is"
(outcome: "Further information is available in...", compared to
"Further information available in...")

PR Close #42888
2021-07-19 17:37:56 -07:00
George Kalpakas 722eb5dd45 fix(docs-infra): prevent main content from overlapping with ToC (#42884)
Previously, if there was more content than what would horizontally fit
in the main content area, it would overflow to the right and overlap
with the Table of Contents (ToC).
This was accidentally introduced in #42787.

This commit fixes it by ensuring that the main content area will not
overlap with ToC and the necessary space for the ToC will be reserved
using `margin` (instead of `padding`, which contributes to the element's
size).

Fixes #42867

PR Close #42884
2021-07-19 17:35:35 -07:00
George Kalpakas e7c770709b fix(docs-infra): correctly handle reported errors (#42883)
Error-handling in AIO happens mainly in two places:
1. For errors happening inside the app we have a custom `ErrorHandler`
   implementation, `ReportingErrorHandler`. `ReportingErrorHandler`
   passes errors to the default `ErrorHandler` (for them to be logged to
   the console) and also forwards them to `window.onerror()`.
2. Errors happening outside the app and errors forwarded by
   `ReportingErrorHandler` are handled by `window.onerror()`, which in
   turn reports them to Google analytics.

Previously, we were making some assumptions (which turned out to be
incorrect based on the info captured in Google analytics - see #28106):
- `ReportingErrorHandler` assumed that the errors passed to its
  `handleError()` method would be either strings or `Error` instances.
  _Apparently, other values (such as `null` or `undefined`) may also be
  passed._
- `window.onerror()` assumed that if an `Error` instance was passed in,
  it would always have a stacktrace (i.e. its `stack` property would be
  defined).
  _This is not necessarily true, although it is not clear (based on the
  logs) whether reported errors of this type are caused by `Error`
  instance with no stacktrace or by non-string error objects which are
  incorrectly treated as `Error` instances.

This commit ensures that all types of error arguments can be handled
correctly, including `Error` instances with no stacktrace and other
types of objects or primitives.

NOTE:
PR #42881 is related as it fixes handling `null` and `undefined`
arguments in the default `ErrorHandler`.

Fixes #28106

PR Close #42883
2021-07-19 17:35:02 -07:00
George Kalpakas 3da71467e9 build(docs-infra): upgrade Lighthouse to version 8.1.0 (#42846)
This commit upgrades `lighthouse` to the latest version (8.1.0) to take
advantage of latest fixes/improvements and ensure the min scores are
still met with the latest audit changes.

PR Close #42846
2021-07-16 10:02:21 -07:00
David Shevitz 4e97514465 docs: remove references to future in topic (#42841)
Fixes #25704

PR Close #42841
2021-07-15 13:23:28 -07:00
Renovate Bot 670300e9ab build: lock file maintenance (#42824)
PR Close #42824
2021-07-15 13:22:37 -07:00
dario-piotrowicz ea936720a6 docs(docs-infra): remove unnecessary "Podcast" from happy-angular podcast's title (#42756)
PR Close #42756
2021-07-15 13:22:03 -07:00
dario-piotrowicz c5561287fd docs(docs-infra): add the angular show to the podcast resources (#42756)
PR Close #42756
2021-07-15 13:22:03 -07:00
dario-piotrowicz c11bcb7383 docs(docs-infra): podcast keys cleanup in resources.json (#42756)
PR Close #42756
2021-07-15 13:22:03 -07:00
dario-piotrowicz ca1fde928a docs(docs-infra): remove deep dive from podcast resources (#42756)
PR Close #42756
2021-07-15 13:22:03 -07:00
Krzysztof Kotowicz 437759ba47 revert: docs: remove references to Trusted Types due to incompatibility with Webpack 5 (#42796)
Re-add reference to Trusted Types since the issue #41754 is resolved in 12.1.1.

This reverts commit 7254fbc2baa1455e3b24400597342843df3017f2.

PR Close #42796
2021-07-14 11:14:08 -07:00
Alan Agius 48c1c81780 docs: remove End-to-end test files structure (#42844)
Since version 12, the Angular CLI no longer generates end-to-end tests.

PR Close #42844
2021-07-14 11:12:42 -07:00
David Shevitz 64bb7cd704 docs: update incorrect bullet text (#42839)
Fixes #42286

PR Close #42839
2021-07-14 11:11:56 -07:00
David Shevitz 970d7f7c6f docs: update routing-overview topic with link to custom route matches tutorial (#42837)
PR Close #42837
2021-07-13 14:07:15 -07:00
Pete Bacon Darwin a524af15a5 docs: move start tutorial alert for clarity (#42764)
The alert was placed in the middle of a set of steps, which
was causing some confusion. This has been moved to the
above the steps in the section and slightly reworded to
make it clearer.

Fixes #42752

PR Close #42764
2021-07-12 13:20:13 -07:00
dario-piotrowicz ef15b979cf docs(core): edit and add docs for ng-template (#42704)
PR Close #42704
2021-07-12 09:39:29 -07:00
George Kalpakas 5356796250 fix(docs-infra): fix margin of social icon on small screens (#42790)
This commit fixes the margin of the social icons on small screens. This
mainly affects screens between 420px and 480px, where only one social
icon is show (due to limited space) but not necessarily the first one
(in DOM order).

**Before:** ![social icon before][1]
**After:** ![social icon after][2]

[1]: https://user-images.githubusercontent.com/8604205/124788616-2f5f0200-df52-11eb-9ec2-9e46b90cd286.png
[2]: https://user-images.githubusercontent.com/8604205/124788623-2ff79880-df52-11eb-90ec-31b04973de68.png

PR Close #42790
2021-07-09 10:15:27 -07:00