Commit Graph

305 Commits

Author SHA1 Message Date
Pete Bacon Darwin 3f89aeb80a build(docs-infra): update CLI option rendering (#26272)
PR Close #26272
2018-10-19 11:07:30 -07:00
Pete Bacon Darwin 6c530d3a85 build(docs-infra): render CLI arguments consistently (#26272)
In the command syntax, arguments are rendered as
`var`s enclosed in angle brackets. So this is now repeated
in the arguments table too.

PR Close #26272
2018-10-19 11:07:30 -07:00
George Kalpakas d9d226087c build(docs-infra): allow `""` as empty region in `{@example}` tags (#26514)
PR Close #26514
2018-10-18 09:54:17 -07:00
George Kalpakas 7bad1d356d build(docs-infra): only render code example content in one place (#26514)
PR Close #26514
2018-10-18 09:54:17 -07:00
George Kalpakas 0add00a743 build(docs-infra): throw error if using `title` on code snippets (#26514)
Since #26396, the `title` property is ignored and `header` should be
used instead for specifying a code snippet's header.

This commit ensures that we don't accidentally set `title` have it be
silently ignored.

PR Close #26514
2018-10-18 09:54:17 -07:00
William Marques fc6dad40ac fix(docs-infra): rename "title" by "header" to avoid unwanted tooltips (#26396)
Closes #26174

PR Close #26396
2018-10-17 11:05:29 -07:00
Pete Bacon Darwin ea20ae63d0 build(docs-infra): only show name in 'inherited from' section (#26387)
Closes #26181

PR Close #26387
2018-10-12 09:13:02 -07:00
George Kalpakas 67608a907e build(docs-infra): make the git ref for cli command docs configurable (#26391)
PR Close #26391
2018-10-11 12:57:49 -07:00
Pete Bacon Darwin 5977b72e9c build(docs-infra): fix formatting of entry point export table (#25768)
Now that `list-table` cells are `pre` formatterd we must be careful
of what whitespace appears in text nodes.

PR Close #25768
2018-10-01 09:36:34 -07:00
Pete Bacon Darwin 7373da9b11 build(docs-infra): simplify property syntax rendering (#25768)
PR Close #25768
2018-10-01 09:36:34 -07:00
Pete Bacon Darwin 783a682a7d build(docs-infra): remove unused property table heading (#25768)
PR Close #25768
2018-10-01 09:36:34 -07:00
Pete Bacon Darwin d22418d417 build(docs-infra): add short description "See more" link (#25768)
If there is additional (non-short) description then add in a
link to the short description to take the reader there.

PR Close #25768
2018-10-01 09:36:34 -07:00
Pete Bacon Darwin 4b1fd98093 build(docs-infra): pluralize NgModule(s) heading as appropriate (#25768)
PR Close #25768
2018-10-01 09:36:34 -07:00
Pete Bacon Darwin 935ef13096 build(docs-infra): improve directive selector rendering (#25768)
`:not(...)` blocks are now rendered as italic, while the
rest of the selector is bold.

PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin f4b60588fb build(docs-infra): move directive macros into memberHelpers.html (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin 15dadb92ef build(docs-infra): include directives etc in class descendants lists (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin ce06a75ebf build(docs-infra): display inherited members on directives (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin 9889276b15 build(docs-infra): directive inputs and outputs (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin d0f7eadc09 build(docs-infra): rename example template variable in directive pages (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin 4b132c9848 build(docs-infra): remove class overview from directive pages (#25768)
PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin 46729c76a0 build(docs-infra): improve directive selector rendering (#25768)
If the documentation contains a `@selectors` tag then the content of that
is used to describe the selectors of a directive.

Otherwise the selector string is split and each selector is listed as
a list item in an unordered list.

PR Close #25768
2018-10-01 09:36:33 -07:00
Pete Bacon Darwin f22deb2e2d build(docs-infra): improve directive API doc templates (#25768)
Closes #22790
Closes #25530

PR Close #25768
2018-10-01 09:36:32 -07:00
Pete Bacon Darwin f29b218060 feat(docs-infra): generate Angular CLI command reference (#25363)
PR Close #25363
2018-09-26 11:24:02 -07:00
Pete Bacon Darwin b8422b41bb build(docs-infra): fail doc-gen if a content rule fails (#26039)
PR Close #26039
2018-09-24 09:11:02 -07:00
Pete Bacon Darwin 8ac4dd6447 build(docs-infra): allow usage notes on decorator option properties (#26039)
PR Close #26039
2018-09-24 09:11:02 -07:00
Pete Bacon Darwin 3808416479 build(docs-infra): remove legacy jsdoc tag processing (#26039)
PR Close #26039
2018-09-24 09:11:02 -07:00
Pete Bacon Darwin cee7448efc build(docs-infra): add @nocollapse tag-def to prevent warning (#26039)
See https://github.com/angular/angular/blob/master/packages/compiler-cli/src/transformers/nocollapse_hack.ts

PR Close #26039
2018-09-24 09:11:02 -07:00
Pete Bacon Darwin 7f1cace2a2 build(docs-infra): sort NgModule exports by id (#26051)
PR Close #26051
2018-09-21 17:00:03 -07:00
Pete Bacon Darwin 56c86c7e79 build(docs-infra): sort package exports by id (#26051)
Closes #26046

PR Close #26051
2018-09-21 17:00:03 -07:00
Pete Bacon Darwin 026b60cd70 build(docs-infra): expose deprecated status on items more clearly (#25750)
PR Close #25750
2018-09-21 10:26:48 -07:00
Pete Bacon Darwin cea2e0477c fix(docs-infra): render security risk labels (#25750)
PR Close #25750
2018-09-21 10:26:48 -07:00
Pete Bacon Darwin 96f9f03d25 build(docs-infra): improve search quality (#25750)
PR Close #25750
2018-09-21 10:26:48 -07:00
Pete Bacon Darwin 9931bd7576 build(docs-infra): do not include license comment in first API doc (#26050)
The default dgeni config is to concatenate leading comments in front of API items.

In the case that you have an API item that starts a file with no import statements,
the license comment at the top of the file was being added to the front of the
API item's comment. SInce the license comment includes the `@license` tag
and the API item's comment did not start with `@description` the content of
the API item's comment was being put inside the `@license` tag, and no
description was being extracted from the API item's comment.

This commit updates to a version of dgeni-packages that has a switch to turn off
this concatenation, and then also configures this switch.

Closes #26045

PR Close #26050
2018-09-21 10:25:41 -07:00
Pete Bacon Darwin b94436d86c build(docs-infra): process and render ngmodule exports (#25734)
All directives and pipes must now be tagged with one ore more
public NgModule, from which they are exported.

If an item is exported transitively via a re-exported internal NgModule
then it may be that the item appears to be exported from more than
one public NgModule. For example, there are shared directives that
are exported in this way from `FormsModule` and `ReactiveFormsModule`.

The doc-gen will error and fail if a directive or pipe is not tagged correctly.

NgModule pages now list all the directives and pipes that are exported from it.
Directive and Pipe pages now list any NgModule from which they are exported.
Packages also now list any NgModules that are contained - previously they were
missed.

PR Close #25734
2018-09-19 16:18:24 -07:00
Pete Bacon Darwin bc5cb8153e build(docs-infra): separate NgModules from Classes in API docs (#25734)
PR Close #25734
2018-09-19 16:18:24 -07:00
Pete Bacon Darwin 34b848ad51 build(docs-infra): remove unused info-bar API template (#25734)
PR Close #25734
2018-09-19 16:18:24 -07:00
Pete Bacon Darwin 4a04ab8823 build(docs-infra): do not render internals in package API pages (#25723)
Closes #24493

PR Close #25723
2018-09-05 09:28:05 -07:00
Martin Sikora d539122466 refactor(docs-infra): refactor templates (#24378)
PR Close #24378
2018-08-31 09:42:10 -07:00
Martin Sikora b89a7dd4a2 fix(docs-infra): show "suggest edits" only for /guide and /tutorial dirs (#24378)
PR Close #24378
2018-08-31 09:42:10 -07:00
Martin Sikora 9533cc9809 feat(docs-infra): add "suggest edits" feature to all docs (#24378)
PR Close #24378
2018-08-31 09:42:10 -07:00
Pete Bacon Darwin b1902db0cb build(docs-infra): render all overloads if they are abstract (#25670)
In an overloaded method, the overload with the function body is the
actual method doc, and this doc is not included in the list of "additional"
overloads.

Moreover, the logic (all in dgeni-packages) is that if none of the items
has a body then we use the first overload as the actual method doc.

In the case of abstract methods, none of the methods have a body. So we
have a situation where the overloads collection does not contain the first
abstract method, even though it is not the "implementation" of the method.
Therefore we need to still render it.

Closes #25610

PR Close #25670
2018-08-27 18:19:08 -04:00
Pete Bacon Darwin a081d207f8 build(docs-infra): remove "annotations" section from API pages (#25677)
PR Close #25677
2018-08-27 18:18:41 -04:00
Pete Bacon Darwin c13901f4c8 build(docs-infra): remove stability labels from API docs (#25453)
PR Close #25453
2018-08-14 13:17:15 -07:00
Pete Bacon Darwin 6a2130117f build(docs-infra): clean up API package template (#25453)
PR Close #25453
2018-08-14 13:17:15 -07:00
Pete Bacon Darwin 4e45f2c481 build(docs-infra): include packages in API template breadcrumbs (#25453)
PR Close #25453
2018-08-14 13:17:15 -07:00
Pete Bacon Darwin 78f477652e build(docs-infra): change breadcrumb delimiter to `>` (#25453)
PR Close #25453
2018-08-14 13:17:15 -07:00
Pete Bacon Darwin edef58f466 build(docs-infra): ensure all API headings are sentence cased (#24949)
Closes #24880

PR Close #24949
2018-07-23 08:43:07 -07:00
George Kalpakas 3cd9645daa fix(docs-infra): fix table header layout in API pages (#24919)
PR Close #24919
2018-07-20 10:48:42 -07:00
Pete Bacon Darwin d8c828c9b1 build(docs-infra): implement the 'package' API template (#24631)
PR Close #24631
2018-07-13 19:45:54 -04:00
Pete Bacon Darwin d876700c26 build(docs-infra): render short description of parameters in API docs (#24537)
PR Close #24537
2018-06-28 15:03:14 -07:00
Pete Bacon Darwin cf0968f98e build(docs-infra): support hiding constructors of injectable classes (#24529)
Classes that are injectable often have constructors that should not be
called by the application developer. It is the responsibility of the
injector to instantiate the class and the constructor often contains
private implementation details that may need to change.

This commit removes constructors from the docs for API items that are
both:

a) Marked with an injectable decorator (e.g. Injectable, Directive,
Component, Pipe), and
b) Have no constructor description

This second rule allows the developer to override the removal if there
is something useful to say about the constructor.

Note that "normal" classes such as `angimations/HttpHeaders` do not have
their constructor removed, despite (at this time) having no description.

PR Close #24529
2018-06-26 10:58:11 -07:00
Pete Bacon Darwin 8c51ce6f3b build(docs-infra): move overload short description above syntax (#24526)
PR Close #24526
2018-06-25 07:56:36 -07:00
Pete Bacon Darwin 45862d0812 build(docs-infra): ensure all headings are sentence cased (#24527)
PR Close #24527
2018-06-15 09:13:45 -07:00
Pete Bacon Darwin 39af314e29 build(aio): add github links to API doc members (#24000)
This change adds Github edit and view links to methods
and decorator options.

It is possible to add these to properties also but the
UI is rather tight as these are displayed in a table.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 8daadf360c build(aio): compute breadcrums for all API doc types (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 859a3d5784 build(aio): fix decorator doc "inherited from" heading (#24000)
We should not include the package path in the inherited
from heading for decorator API docs

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 8a4c577917 build(aio): fix broken doc-gen unit test (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 2b15108f7e build(aio): remove invalid H3 usage notes heading (#24000)
This heading is too high for the section because the
method name is a H3 but it cannot be a H4 because
usage notes may contain H4 headings.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin bc4f10ca20 build(aio): rearrange processors to ensure we catch all content errors (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 77309e2ea4 build(aio): map H3 headings into H4 headings for certain templates (#24000)
The sections such as methods and decorator options are already headed
by a H3 heading so we need to map the H3 headings in the API doc source
down to H4 headings.

This commit includes general heading mapping functionality accessible via
the `marked` Nunjucks filter.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin e371b226fa build(aio): rearrange decorator API doc template (#24000)
The overview of the decorator options is now a table.
The detailed description of each option is now a full section.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin ccb19fea68 build(aio): remove unused `@linkDocs` alias for `@link` jsdoc tag (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin e7b392bf3a build(aio): improve automatic linking of code items (#24000)
This commit adds new link disambiguators that mean that more
code links can be generated automatically in a sensible way.

The best example is the use of properties within class, interface and
enum documentation.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin d4d8125b2d build(aio): refactor the decorator doc processing (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 62443b04a0 build(aio): do not allow `@usageNotes` on properties (#24000)
PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 4168c946c6 build(aio): add content rule to prevent usageNotes in non-export API docs (#24000)
This commit also factors out `API_CONTAINED_DOC_TYPES` to be used by
both `filterContainedDocs` and `addAllowedPropertiesRules`.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 293ec78069 build(aio): don't constrain `checkContentRules` to run before another processor (#24000)
We don't really care when this processor runs as long as it happens
after the tags have been extracted.
By not constraining its `runBefore` property we can ensure that other
processors can be run before it.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 131d0d8e8a build(aio): do not try to auto-link to internal API items (#24000)
This would cause dangling links since the target, being internal,
would not exist in the docs.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 5fb0b567ce build(aio): don't render `@Annotation` tags (#24000)
Because we were "ignoring" these tags they were being
rendered as part of the previous tag.
What we really want to do is know about them, so that we
don't break the doc-gen but then ignore them when rendering.

PR Close #24000
2018-06-13 16:47:40 -07:00
Pete Bacon Darwin 9f877f4416 build(docs-infra): ensure stability is computed before the API list (#24356)
Previously the API list was being generated before the stability had
been computed. This meant that the API list page showed no API docs
when filtering by `stable` stability status.

Closes #24329

PR Close #24356
2018-06-08 13:33:32 -07:00
Pete Bacon Darwin 700e55ce14 build(docs-infra): log warning rather than error if content errors are not fatal (#24320)
PR Close #24320
2018-06-06 10:25:04 -07:00
Pete Bacon Darwin 68d37ef0c1 build(aio): ensure the correct decorator properties are merged (#24289)
Previously only the `description` and `usageNotes` were being copied over
from the call-member of the decorator interface. Important properties such
as `shortDescription` were missed.

These are now added and the code has been refactored to make it simpler and
clearer to update which properties get copied as the requirements change.

PR Close #24289
2018-06-06 10:23:47 -07:00
Pete Bacon Darwin 02acb5e3e5 build(aio): improve `enum` API rendering (#23872)
* The member details section is now called "Members", rather
than "Properties".
* The property table now displays appropriate table headings:
"Member", "Value", "Description".
* The "Value" column is not shown if none of the members have
a value.

Closes #22678

PR Close #23872
2018-05-14 10:37:42 -07:00
Pete Bacon Darwin a2e8b3a6a8 build(aio): ensure usageNotes are copied into decorator API docs (#23901)
PR Close #23901
2018-05-14 10:35:33 -07:00
Pete Bacon Darwin d889f57ae2 build(aio): display types of API const docs correctly (#23850)
Previously these docs always displayed `any` as the type
of the const export. Now the type is computed correctly from
the declared type or initializer of the constant.

PR Close #23850
2018-05-11 16:44:50 -04:00
Pete Bacon Darwin 61170856ee build(aio): include `navigation.json` changes in docs-watch (#23698)
Closes #23582

PR Close #23698
2018-05-09 11:45:18 -07:00
Pete Bacon Darwin aae437cb1e build(aio): implement rules to prevent short parameter names (#22759)
PR Close #22759
2018-04-12 00:06:49 -07:00
Pete Bacon Darwin fa11d7822c build(aio): create minLength content rule (#22759)
This rule can be used to ensure that properties contain a minimum
number of characters.

PR Close #22759
2018-04-12 00:06:49 -07:00
Pete Bacon Darwin 1619160c8a build(aio): implement rules to prevent headings in content (#22759)
* No headings are allowed in `description` and `shortDescription`
* Only heading level 3 is allowed in `usageNotes`

PR Close #22759
2018-04-12 00:06:49 -07:00
Pete Bacon Darwin 7a8c58162c build(aio): create noMarkdownHeadings content rule (#22759)
This content rule can check what markdown headings
appear in content properties.

PR Close #22759
2018-04-12 00:06:49 -07:00
Pete Bacon Darwin e0ae74d40e build(aio): add checkContentRules processor (#22759)
This processor will enable us to write rules about
how the content should appear, such as:

* no headings in markdown content
* only one sentence per line
* no single character parameter names
* etc.

PR Close #22759
2018-04-12 00:06:49 -07:00
Pete Bacon Darwin 381da1af45 build(aio): move "optional" and "default" to end of param description (#23062)
PR Close #23062
2018-04-05 09:25:15 -07:00
Pete Bacon Darwin 5b6e59cfb3 build(aio): fail the doc-gen if the nav is invalid (#23175)
PR Close #23175
2018-04-04 14:32:14 -07:00
Veres Lajos de90314304 style: typos fixed - https://github.com/vlajos/misspell-fixer (#22975)
PR Close #22975
2018-03-27 14:51:53 -04:00
Andrew Seguin 22b96b9690 feat(elements): add support for creating custom elements (#22413)
PR Close #22413
2018-03-16 12:39:07 -07:00
Pete Bacon Darwin 19e6b8dad5 build(aio): fix `addNotYetDocumentedProperty` processor (#22770)
It was running too late and so was being confused by the
description being split into `shortDescription` and `description`
properties.

Closes #22748

PR Close #22770
2018-03-15 11:37:31 -07:00
Pete Bacon Darwin d509bd6849 build(aio): improve the API Pipe pages (#22702)
This change adds:

* an impure badge for Pipes that are marked as  `pure: false`
* a pipe specific overview that shows the syntax for using a pipe in a template.
* an "input value" section describing the type of the value that the pipe expects.
* a "pipe params" section describing any additional params that a pipe expects.

PR Close #22702
2018-03-14 14:21:11 -07:00
Pete Bacon Darwin 6f0dad1710 build(aio): render doc-gen issues in overview dump (#22675)
Related to #22138

PR Close #22675
2018-03-14 10:20:30 -07:00
Pete Bacon Darwin 48636f3e85 build(aio): compute stability and deprecate `@stable` tag (#22674)
Closes #22635

PR Close #22674
2018-03-13 19:55:00 -07:00
Pete Bacon Darwin cd58c0a6d9 build(aio): remove unwanted overview headings (#22681)
PR Close #22681
2018-03-12 11:23:47 -07:00
Pete Bacon Darwin 38fef1588d build(aio): move "see also" block to export-base template (#22681)
This makes it easier for all the API docs to display "see also" links
in a consitent manner.

PR Close #22681
2018-03-12 11:23:46 -07:00
Alex Eagle 1e6cc42a01 test: migrate remaining public-api tests to Bazel (#22639)
We now create npm packages to cover all the public api assertions in tools/public_api_guard.
We no longer depend on ts-api-guardian from npm - it is now stale since the repository was archived.
There is no longer a gulp task to enforce or accept the public API, this is in CircleCI as part of running all bazel test targets.

PR Close #22639
2018-03-09 09:11:40 -08:00
Pete Bacon Darwin b3d1761825 build(aio): compute and display short descriptions in methods (#22583)
Previously only export docs were displaying a short description.
Now methods in classes and interfaces also compute and render
the short description.

Closes #22500

PR Close #22583
2018-03-06 11:05:21 -08:00
Pete Bacon Darwin 8ea4c57174 fix(aio): reposition and shrink the API badges (#22570)
Closes #22130

PR Close #22570
2018-03-05 21:25:09 -08:00
Pete Bacon Darwin 58932c7f38 build(aio): indicate whether properties are read-only in API pages (#22584)
PR Close #22584
2018-03-05 10:15:37 -08:00
Pete Bacon Darwin 5bb9f64218 fixup! feat(aio): allow template to position embedded ToC (#22565)
PR Close #22565
2018-03-05 10:14:16 -08:00
Pete Bacon Darwin 405d97431f fixup! feat(aio): allow template to position embedded ToC (#22565)
PR Close #22565
2018-03-05 10:14:16 -08:00
Pete Bacon Darwin 41064fcb36 fix(aio): reposition and simplify github links (#22565)
Closes #22379

PR Close #22565
2018-03-05 10:14:16 -08:00
Pete Bacon Darwin b80fd6be58 build(aio): render whether API classes and members are abstract (#22563)
Closes #22537

PR Close #22563
2018-03-05 10:13:43 -08:00
Pete Bacon Darwin b64139650c build(aio): class API template once again extends export-base (#22534)
PR Close #22534
2018-03-05 10:12:55 -08:00