Zhicheng WANG
4eb5431162
fix: merge from v10.0
2020-06-28 10:47:43 +08:00
Zhicheng WANG
8675bc5719
docs: 合并远端更新
...
初步合并了冲突,尚未校验,四个改动很大的章节暂时改回了英文版
2020-06-12 18:18:15 +08:00
Joey Perrott
d1ea1f4c7f
build: update license headers to reference Google LLC ( #37205 )
...
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.
PR Close #37205
2020-05-26 14:26:58 -04:00
Sonu Kapoor
03afa36334
refactor(docs-infra): refactors checkUnbalancedBackTicks ( #37065 )
...
This commit removes the dependency on the `lodash` module and refactors
the `checkUnbalancedBackTicks` method.
PR Close #37065
2020-05-15 10:13:19 -07:00
Pete Bacon Darwin
901db0e730
build(docs-infra): remove {@searchKeywords} from content when rendering ( #37132 )
...
Previously this inline-tag-def was returning the `doc` which is rendered
to the output as `[Object Object]` - obviously not what is intended.
Now it returns `''` which effectively strips the tag handler from the
rendered output.
PR Close #37132
2020-05-15 10:04:45 -07:00
Sonu Kapoor
2418c6aca1
refactor(docs-infra): refactors addImageDimensionsImpl ( #37046 )
...
This commit changes the `addImageDimensionsImpl` method to reduce
nesting. It will exit early, if the conditions are not matched.
PR Close #37046
2020-05-14 10:48:01 -07:00
Sonu Kapoor
d7c77cb175
refactor(docs-infra): refactors autoLinkCode ( #36686 )
...
PR Close #36686
2020-04-21 12:49:55 -04:00
Sonu Kapoor
bb150c2704
fixup!: build(docs-infra): Ensures that only member docs are linked ( #36316 )
...
PR Close #36316
2020-04-17 12:33:56 -04:00
Sonu Kapoor
46ff673192
fixup!: build(docs-infra): Ensures that only member docs are linked ( #36316 )
...
PR Close #36316
2020-04-17 12:33:55 -04:00
Sonu Kapoor
7842f73e8b
fixup!: build(docs-infra): add _ to ignored ignoreGenericWords ( #36316 )
...
PR Close #36316
2020-04-17 12:33:55 -04:00
Sonu Kapoor
e5f9e3d018
build(docs-infra): add _ to ignored ignoreGenericWords ( #36316 )
...
Previously, when a document included `_`, the autoLinker will try to
generate a link, e.g from `core/ɵComponentDef._`. This commit adds it
to the ignored words to prevent that.
PR Close #36316
2020-04-17 12:33:55 -04:00
Sonu Kapoor
aebd5f9af6
build(docs-infra): Ensures that only member docs are linked ( #36316 )
...
This commit ensures that `member` docs are only linked if the linking
text contains `.`.
PR Close #36316
2020-04-17 12:33:55 -04:00
Sonu Kapoor
4fb034aeec
build(docs-infra): fix autoLinkCode to ignore docs without a path ( #36316 )
...
Previously, the auto linker generated links without an `href` when the
API was private. This commit fixes this by making sure that the `path`
of the document is not empty.
Closes #36260
PR Close #36316
2020-04-17 12:33:55 -04:00
Sonu Kapoor
7ca2a2a863
feat(docs-infra): add searchKeywords preprocessor ( #35539 )
...
This commit adds a new preprocessor to use `${@searchKeywords}`, allowing
the docs to use a list of custom search phrases that will be
prioritized over the keywords found in the content.
Closes #35449
PR Close #35539
2020-02-27 10:47:52 -08:00
Zhicheng WANG
c3e9cb2608
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/guide/angular-compiler-options.md
# aio/content/guide/aot-metadata-errors.md
# aio/content/guide/architecture-next-steps.md
# aio/content/guide/architecture.md
# aio/content/guide/browser-support.md
# aio/content/guide/cli-builder.md
# aio/content/guide/comparing-observables.md
# aio/content/guide/dependency-injection-providers.md
# aio/content/guide/deployment.md
# aio/content/guide/deprecations.md
# aio/content/guide/glossary.md
# aio/content/guide/ivy.md
# aio/content/guide/observables.md
# aio/content/guide/router.md
# aio/content/guide/static-query-migration.md
# aio/content/guide/template-typecheck.md
# aio/content/guide/transition-and-triggers.md
# aio/content/guide/updating-to-version-9.md
# aio/content/marketing/docs.md
# aio/content/navigation.json
# aio/content/tutorial/index.md
# aio/content/tutorial/toh-pt1.md
# aio/content/tutorial/toh-pt4.md
# aio/package.json
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/app/layout/footer/footer.component.html
# aio/yarn.lock
# packages/common/src/pipes/number_pipe.ts
# packages/forms/src/directives/validators.ts
# packages/forms/src/model.ts
2020-02-05 12:08:32 +08:00
Judy Bogart
549ab2ecc3
build(docs-infra): add words to ignore in snippets ( #34915 )
...
PR Close #34915
2020-01-27 10:49:03 -08:00
Zhicheng WANG
8663fa04a8
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# .nvmrc
# aio/content/cli/index.md
# aio/content/guide/ajs-quick-reference.md
# aio/content/guide/animations.md
# aio/content/guide/aot-compiler.md
# aio/content/guide/app-shell.md
# aio/content/guide/architecture-components.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-services.md
# aio/content/guide/architecture.md
# aio/content/guide/attribute-directives.md
# aio/content/guide/bazel.md
# aio/content/guide/bootstrapping.md
# aio/content/guide/browser-support.md
# aio/content/guide/build.md
# aio/content/guide/cheatsheet.md
# aio/content/guide/cli-builder.md
# aio/content/guide/comparing-observables.md
# aio/content/guide/complex-animation-sequences.md
# aio/content/guide/component-interaction.md
# aio/content/guide/component-styles.md
# aio/content/guide/creating-libraries.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/dependency-injection-navtree.md
# aio/content/guide/dependency-injection-providers.md
# aio/content/guide/dependency-injection.md
# aio/content/guide/deployment.md
# aio/content/guide/deprecations.md
# aio/content/guide/displaying-data.md
# aio/content/guide/dynamic-component-loader.md
# aio/content/guide/dynamic-form.md
# aio/content/guide/elements.md
# aio/content/guide/entry-components.md
# aio/content/guide/feature-modules.md
# aio/content/guide/file-structure.md
# aio/content/guide/form-validation.md
# aio/content/guide/forms-overview.md
# aio/content/guide/forms.md
# aio/content/guide/frequent-ngmodules.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/http.md
# aio/content/guide/i18n.md
# aio/content/guide/ivy.md
# aio/content/guide/language-service.md
# aio/content/guide/lazy-loading-ngmodules.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/module-types.md
# aio/content/guide/ngmodule-api.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/ngmodule-vs-jsmodule.md
# aio/content/guide/ngmodules.md
# aio/content/guide/npm-packages.md
# aio/content/guide/observables-in-angular.md
# aio/content/guide/observables.md
# aio/content/guide/pipes.md
# aio/content/guide/providers.md
# aio/content/guide/reactive-forms.md
# aio/content/guide/releases.md
# aio/content/guide/reusable-animations.md
# aio/content/guide/route-animations.md
# aio/content/guide/router.md
# aio/content/guide/rx-library.md
# aio/content/guide/schematics-authoring.md
# aio/content/guide/schematics-for-libraries.md
# aio/content/guide/schematics.md
# aio/content/guide/security.md
# aio/content/guide/service-worker-communications.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/service-worker-devops.md
# aio/content/guide/service-worker-getting-started.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/set-document-title.md
# aio/content/guide/setup-local.md
# aio/content/guide/sharing-ngmodules.md
# aio/content/guide/singleton-services.md
# aio/content/guide/static-query-migration.md
# aio/content/guide/structural-directives.md
# aio/content/guide/styleguide.md
# aio/content/guide/template-syntax.md
# aio/content/guide/testing.md
# aio/content/guide/transition-and-triggers.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/guide/updating.md
# aio/content/guide/upgrade-setup.md
# aio/content/guide/upgrade.md
# aio/content/guide/user-input.md
# aio/content/guide/using-libraries.md
# aio/content/guide/visual-studio-2015.md
# aio/content/guide/web-worker.md
# aio/content/guide/workspace-config.md
# aio/content/marketing/events.html
# aio/content/marketing/resources.json
# aio/content/navigation.json
# aio/content/start/data.md
# aio/content/start/deployment.md
# aio/content/start/forms.md
# aio/content/start/index.md
# aio/content/start/routing.md
# aio/content/tutorial/index.md
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt1.md
# aio/content/tutorial/toh-pt2.md
# aio/content/tutorial/toh-pt3.md
# aio/content/tutorial/toh-pt4.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/package.json
# aio/src/app/app.component.spec.ts
# aio/src/app/custom-elements/api/api-list.component.html
# aio/src/app/layout/doc-viewer/doc-viewer.component.ts
# aio/src/app/layout/mode-banner/mode-banner.component.ts
# aio/src/app/layout/nav-item/nav-item.component.html
# aio/src/app/shared/toc.service.ts
# aio/src/styles/0-base/_typography.scss
# aio/src/styles/2-modules/_api-pages.scss
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/yarn.lock
# packages/common/http/src/headers.ts
# packages/common/http/src/interceptor.ts
# packages/common/http/src/params.ts
# packages/common/http/src/response.ts
# packages/common/src/common_module.ts
# packages/common/src/directives/ng_for_of.ts
# packages/common/src/location/location.ts
# packages/common/src/pipes/date_pipe.ts
# packages/core/src/change_detection/pipe_transform.ts
# packages/core/src/di/injectable.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/directives.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render3/component_ref.ts
# packages/forms/src/directives/reactive_directives/form_control_name.ts
# packages/forms/src/form_builder.ts
# packages/forms/src/model.ts
# packages/forms/src/validators.ts
# packages/router/src/config.ts
# packages/router/src/directives/router_outlet.ts
# packages/router/src/events.ts
# packages/router/src/router.ts
# packages/router/src/router_module.ts
# packages/router/src/router_state.ts
# packages/router/src/shared.ts
2020-01-24 15:55:22 +08:00
Kapunahele Wong
a3b2d6735a
build(docs-infra): add auto-link-filter for generic words ( #34835 )
...
Fixes #34794
PR Close #34835
2020-01-21 15:08:01 -05:00
Pete Bacon Darwin
06bca0cc66
fix(docs-infra): do not auto-link code in bash and json snippets ( #33877 )
...
Previously any code block, which was not marked with
`no-auto-link` css class would have its contents auto-linked to
API pages. Sometimes this results in false positive links being
generated.
This is problematic for triple backticked blocks, which cannot provide
the `no-auto-link` CSS class to prevent the linking.
This commit fixes the problem by allowing the auto-linker to be
configured not to auto-link code blocks that have been marked with an
"ignored" language. By default these are `bash` and `json`.
Triple backticked blocks are able to specify the language directly after
the first set of triple backticks.
Fixes #33859
PR Close #33877
2019-11-18 09:11:01 -08:00
Pete Bacon Darwin
526537fefe
style(docs-infra): reformat the auto-link-code files ( #33877 )
...
PR Close #33877
2019-11-18 09:11:01 -08:00
George Kalpakas
d7ca263cc4
test(docs-infra): run tests in random order (and make them pass) ( #31527 )
...
This commit updates the necessary config files to run the angular.io and
docs tooling unit tests in random order (and fixes the tests that were
failing due to their dependence on the previous ordered execution).
Besides being a good idea anyway, running tests in random order is the
new [default behavior in [email protected] ][1], so this commit is in
preparation of upgrading jasmine to the latest version.
[1]: https://github.com/jasmine/jasmine/blob/v3.0.0/release_notes/3.0.md#breaking-changes
PR Close #31527
2019-07-18 10:17:13 -07:00
Pete Bacon Darwin
1db3ac457c
build(docs-infra): update dgeni-packages dependency ( #31368 )
...
The new version 0.27.5 now has the `post-process-html` package, so we
don't need it in angular/angular any more.
PR Close #31368
2019-07-02 11:28:23 -07:00
George Kalpakas
c34abf2cbc
refactor(docs-infra): move auto-link filters to dedicated directory ( #31051 )
...
These filters have generic names (e.g. `filterPipes`), which do not make
their purpose obvious. Moving them to a dedicated `auto-link-filters`
directory should help with that.
PR Close #31051
2019-06-19 14:59:34 -07:00
George Kalpakas
c6b180380a
fix(docs-infra): do not auto-link http:// to the common/http ( #31051 )
...
Previously, our auto-linking feature would match `http` in URLs (such as
`http://...`) to the `common/http` package and automatically create a
link to that, which was undesirable. While it is possible to work around
that via `<code class="no-auto-link">http://...</code>`, most people
didn't even realize the issue.
Since in this case it is possible to reliably know it is a false match,
this commit fixes it by applying a custom auto-link filter that ignores
all docs for `http`, if it comes before `://`.
Fixes #31012
PR Close #31051
2019-06-19 14:59:34 -07:00
Zhicheng WANG
d5057aec3b
Merge remote-tracking branch 'en/master' into aio
2019-06-03 10:09:20 +08:00
George Kalpakas
8bbf481d60
refactor(docs-infra): rename properties (blacklisted --> ignored) ( #29754 )
...
PR Close #29754
2019-04-08 09:46:34 -07:00
George Kalpakas
c5bba8d9f2
build(docs-infra): do not include announcements.json in sitemap ( #29754 )
...
The `announcements.json` file should not be included in the sitemap and
including it causes an error in Google Search Console (because the
generated URL does not exist).
(This is a follow-up to fbef94a8e.)
PR Close #29754
2019-04-08 09:46:33 -07:00
Pete Bacon Darwin
a4f3f3f81d
build(docs-infra): support doc aliases via @alias dgeni tag ( #29673 )
...
Now, one can add an `@alias` tag to API docs, which tells dgeni that this
API element (usually a `const`) is really just an alias for some API element
defined elsewhere.
Dgeni will then look up this API element and copy over the properties from
the alias to the current doc.
For example, we would like to privately export an Enum from `@angular/core`
but then publicly export this from `@angular/common`:
**packages/core/private_exports.ts**
```ts
/**
* Description of this document.
*/
export enum ɵSomeEnum { ... }
```
**packages/common/public_api.ts**
```ts
import {ɵSomeEnum} from '@angular/core';
/**
* @alias core/ɵSomeEnum
*/
export const SomeEnum = ɵSomeEnum;
```
In the generated docs there will be a page for `common/SomeEnum`, which
will be rendered as an enum, rather than a const, showing the description
extracted from the `core/ɵSomeEnum`.
---
The implementation of this feature required some refactoring of the other
processing:
1. Previously `ɵ` prefixed exports were not even considered.
2. Due to 1. some processors needed to have guards added to ignore such
private exports (`addMetadataAliases` and `checkContentRules`).
3. The processing of package pages had to be reworked (and split) so that
it picked up the aliased export docs after their alias proeprties had
been copied.
See FW-1207, FW-632, #29249
PR Close #29673
2019-04-04 10:52:36 -07:00
Zhicheng WANG
8744f17f5d
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/cli/index.md
# aio/content/file-not-found.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-services.md
# aio/content/guide/build.md
# aio/content/guide/deployment.md
# aio/content/guide/elements.md
# aio/content/guide/feature-modules.md
# aio/content/guide/file-structure.md
# aio/content/guide/forms-overview.md
# aio/content/guide/glossary.md
# aio/content/guide/i18n.md
# aio/content/guide/npm-packages.md
# aio/content/guide/releases.md
# aio/content/guide/router.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/testing.md
# aio/content/guide/upgrade-performance.md
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/package.json
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/app/documents/document.service.ts
# aio/src/app/layout/top-menu/top-menu.component.ts
# aio/src/index.html
# aio/src/styles/2-modules/_api-pages.scss
# aio/tools/transforms/templates/api/base.template.html
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/tools/transforms/templates/cli/cli-container.template.html
# aio/tools/transforms/templates/lib/githubLinks.html
# aio/yarn.lock
# packages/animations/src/animation_metadata.ts
# packages/common/http/src/backend.ts
# packages/common/http/src/client.ts
# packages/common/http/src/headers.ts
# packages/common/http/src/interceptor.ts
# packages/common/http/src/module.ts
# packages/common/http/src/params.ts
# packages/common/http/src/request.ts
# packages/common/http/src/response.ts
# packages/common/src/common_module.ts
# packages/common/src/directives/ng_class.ts
# packages/common/src/directives/ng_style.ts
# packages/common/src/directives/ng_switch.ts
# packages/common/src/i18n/format_date.ts
# packages/common/src/pipes/number_pipe.ts
# packages/core/src/change_detection/change_detection_util.ts
# packages/core/src/change_detection/pipe_transform.ts
# packages/core/src/di/injectable.ts
# packages/core/src/linker/element_ref.ts
# packages/core/src/linker/template_ref.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/directives.ts
# packages/core/src/metadata/lifecycle_hooks.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render/api.ts
# packages/forms/src/directives/form_interface.ts
# packages/forms/src/directives/ng_form.ts
# packages/forms/src/directives/ng_model.ts
# packages/forms/src/directives/reactive_directives/form_control_name.ts
# packages/forms/src/directives/select_control_value_accessor.ts
# packages/forms/src/directives/validators.ts
# packages/forms/src/form_builder.ts
# packages/forms/src/form_providers.ts
# packages/forms/src/model.ts
# packages/forms/src/validators.ts
# packages/platform-browser/src/browser.ts
# packages/platform-browser/src/security/dom_sanitization_service.ts
# packages/router/src/config.ts
# packages/router/src/events.ts
# packages/router/src/router.ts
# packages/router/src/router_module.ts
# packages/router/src/shared.ts
2018-12-29 16:04:37 +08:00
Pete Bacon Darwin
9ff8155cd9
build(docs-infra): mark code blocks to disable auto-linking ( #26675 )
...
You can now mark `<code>` blocks with a `no-auto-link` css class
to tell the code auto-linker to ignore this code block.
PR Close #26675
2018-10-26 18:09:20 -04:00