Skip to content

Commit abd21be

Browse files
author
Martynas Žilinskas
authored
Feature: Logging (#37)
1 parent 58a9651 commit abd21be

26 files changed

+128
-80
lines changed

common/config/rush/npm-shrinkwrap.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ts-docs-gen/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ ts-docs-gen --config ./docs-gen.json
3939
## Configuration
4040
JSON config properties and CLI flags.
4141

42-
| Property | CLI Flag | Required | Type | Default | Description |
43-
| ------------------- | --------------------- | ---------- | -------- | ----------- | ------------------------------------------------------------------------------------- |
44-
| | `--config` | _optional_ | string | | Relative path to config json file. |
45-
| `entryFile` | `--entryFile` | _required_ | string[] | | TypeScript project entry files. |
46-
| `project` | `--project`, `-p` | _optional_ | string | cwd | Full path to TypeScript project directory. |
47-
| `output` | `--output`, `-o` | _optional_ | string | ./docs/api/ | Documentation output directory. |
48-
| `plugin` | `--plugin` | _optional_ | string[] | | Package name or path to plugin. |
49-
| `exclude` | `--exclude` | _optional_ | string[] | | File locations that should not be included generated documentation. |
50-
| `externalPackage` | `--externalPackage` | _optional_ | string[] | | External package names to include in extracted data. |
51-
| `excludePrivateApi` | `--excludePrivateApi` | _optional_ | boolean | `true` | Excludes api items that has access modifier set to "private" or JSDoc tag "@private". |
42+
| Property | CLI Flag | Required | Type | Default | Description |
43+
| ------------------- | --------------------- | ---------- | ----------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------ |
44+
| | `--config` | _optional_ | string | | Relative path to config json file. |
45+
| `entryFile` | `--entryFile` | _required_ | string[] | | TypeScript project entry files. |
46+
| `project` | `--project`, `-p` | _optional_ | string | cwd | Full path to TypeScript project directory. |
47+
| `output` | `--output`, `-o` | _optional_ | string | ./docs/api/ | Documentation output directory. |
48+
| `plugin` | `--plugin` | _optional_ | string[] | | Package name or path to plugin. |
49+
| `exclude` | `--exclude` | _optional_ | string[] | | File locations that should not be included generated documentation. |
50+
| `externalPackage` | `--externalPackage` | _optional_ | string[] | | External package names to include in extracted data. |
51+
| `excludePrivateApi` | `--excludePrivateApi` | _optional_ | boolean | `true` | Excludes api items that has access modifier set to "private" or JSDoc tag "@private". |
52+
| `verbosity` | `--verbosity` | _optional_ | "None", "Critical", "Error", "Warning", "Information", "Debug", "Trace" | "Information" | Verbosity of output. |
53+
| `dryRun` | `--dryRun` | _optional_ | boolean | | Generates markdown files but not writes them. Outputs generated data in `Debug` log level. |

packages/ts-docs-gen/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"@types/yargs": "^10.0.1",
3030
"fs-extra": "^5.0.0",
3131
"simplr-logger": "^1.0.1",
32-
"ts-extractor": "^4.0.0-rc.2",
33-
"typescript": "^2.6.2",
32+
"ts-extractor": "^4.0.0-rc.4",
33+
"typescript": "^2.7.1",
3434
"yargs": "^11.0.0"
3535
},
3636
"devDependencies": {

packages/ts-docs-gen/src/api-items/api-callable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ReferenceRenderHandler } from "../contracts/serialized-api-item";
1111
* Base class for callable api items.
1212
*/
1313
export abstract class ApiCallable<TKind extends Contracts.ApiCallableBaseDefinition> extends ApiDefinitionBase<TKind> {
14-
private parameters: ApiParameter[];
14+
private parameters: ApiParameter[] | undefined;
1515

1616
public get Parameters(): ApiParameter[] {
1717
if (this.parameters == null) {
@@ -23,7 +23,7 @@ export abstract class ApiCallable<TKind extends Contracts.ApiCallableBaseDefinit
2323
return this.parameters;
2424
}
2525

26-
private typeParameters: ApiTypeParameter[];
26+
private typeParameters: ApiTypeParameter[] | undefined;
2727

2828
public get TypeParameters(): ApiTypeParameter[] {
2929
if (this.typeParameters == null) {

packages/ts-docs-gen/src/api-items/api-definition-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type ApiBaseItemContainerDto = Contracts.ApiBaseDefinition & { Members: C
1111
export abstract class ApiDefinitionContainer<TKind extends ApiBaseItemContainerDto = ApiBaseItemContainerDto>
1212
extends ApiDefinitionBase<TKind> {
1313

14-
private members: ApiDefinitions[];
14+
private members: ApiDefinitions[] | undefined;
1515

1616
public get Members(): ApiDefinitions[] {
1717
if (this.members == null) {

packages/ts-docs-gen/src/api-items/api-definition-with-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type ApiBaseItemWithTypeDto = Contracts.ApiBaseDefinition & { Type: Contr
88
export abstract class ApiDefinitionWithType<TKind extends ApiBaseItemWithTypeDto = ApiBaseItemWithTypeDto>
99
extends ApiDefinitionBase<TKind> {
1010

11-
private type: ApiTypes;
11+
private type: ApiTypes | undefined;
1212

1313
public get Type(): ApiTypes {
1414
if (this.type == null) {

packages/ts-docs-gen/src/api-items/api-type-members-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GeneratorHelpers } from "../generator-helpers";
44
import { ApiTypes } from "./api-type-list";
55

66
export abstract class ApiTypeMembersBase<TKind extends Contracts.ApiMembersBaseType> extends ApiTypeBase<TKind> {
7-
private members: ApiTypes[];
7+
private members: ApiTypes[] | undefined;
88

99
public get Members(): ApiTypes[] {
1010
if (this.members == null) {

packages/ts-docs-gen/src/api-items/definitions/api-class.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ApiTypeParameter } from "./api-type-parameter";
66
import { ReferenceRenderHandler } from "../../contracts/serialized-api-item";
77

88
export class ApiClass extends ApiDefinitionContainer<Contracts.ApiClassDto> {
9-
private typeParameters: ApiTypeParameter[];
9+
private typeParameters: ApiTypeParameter[] | undefined;
1010

1111
public get TypeParameters(): ApiTypeParameter[] {
1212
if (this.typeParameters == null) {
@@ -23,7 +23,7 @@ export class ApiClass extends ApiDefinitionContainer<Contracts.ApiClassDto> {
2323
return this.extends;
2424
}
2525

26-
private implements: ApiTypes[];
26+
private implements: ApiTypes[] | undefined;
2727

2828
public get Implements(): ApiTypes[] {
2929
if (this.implements == null) {

packages/ts-docs-gen/src/api-items/definitions/api-enum.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ApiItemReference } from "../../contracts/api-item-reference";
77
import { ReferenceRenderHandler } from "../../contracts/serialized-api-item";
88

99
export class ApiEnum extends ApiDefinitionBase<Contracts.ApiEnumDto> {
10-
private enumMembers: ApiEnumMember[];
10+
private enumMembers: ApiEnumMember[] | undefined;
1111

1212
public get EnumMembers(): ApiEnumMember[] {
1313
if (this.enumMembers == null) {

packages/ts-docs-gen/src/api-items/definitions/api-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ApiDefinitionWithType } from "../api-definition-with-type";
55
import { ReferenceRenderHandler } from "../../contracts/serialized-api-item";
66

77
export class ApiIndex extends ApiDefinitionWithType<Contracts.ApiIndexDto> {
8-
private parameter: ApiParameter;
8+
private parameter: ApiParameter | undefined;
99

1010
public get Parameter(): ApiParameter {
1111
if (this.parameter == null) {

0 commit comments

Comments
 (0)