Skip to content

Commit 2a37d3d

Browse files
Merge pull request #33 from christophercr/feature/compodoc-config-refactoring
docs(developer-guide): include developer guide in compodoc generated docs
2 parents a9707d5 + a87bdb6 commit 2a37d3d

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

.compodocrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/@compodoc/compodoc/src/config/schema.json",
3+
"theme": "material",
4+
"tsconfig": "./tsconfig.json",
5+
"output": "./reports/api-docs/ngx-form-errors",
6+
"includes": "./docs",
7+
"includesName": "Developer Guide"
8+
}

docs/DEV_GUIDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
---
3030

31-
## <a name="ngx-form-errors">ngxFormErrors directive
31+
## <a name="ngx-form-errors"></a>ngxFormErrors directive
3232

3333
This directive creates an Error component dynamically where the validation messages will be displayed. See [Defining the Error component to use](#defining-error-component).
3434

35-
### <a name="binding-form-control">Binding to a FormControl
35+
### <a name="binding-form-control"></a>Binding to a FormControl
3636

3737
Let's start by defining the Angular form group:
3838

@@ -60,7 +60,7 @@ At runtime, the validation messages are displayed by the Error component that is
6060

6161
Remember that you need to provide the Error component that will be created by this directive. See [Defining the Error component to use](#defining-error-component).
6262

63-
### <a name="validation-errors">Validation errors emitted
63+
### <a name="validation-errors"></a>Validation errors emitted
6464

6565
In order to display the validation messages in the Error component, the `ngxFormErrors` directive emits an array of error objects containing the following information:
6666

@@ -198,7 +198,7 @@ Just wrap the `ngxFormErrors` directive inside a `<mat-error>` element and that'
198198
</form>
199199
```
200200

201-
In fact, we have integrated [Angular Material](https://material.angular.io) in our [demo app](../demo-app). Check it out!
201+
In fact, we have integrated [Angular Material](https://material.angular.io) in our [demo app](https://github.com/NationalBankBelgium/ngx-form-errors/tree/master/demo-app). Check it out!
202202

203203
You can also integrate the directive with other UI libraries. This is really simple since you just need to use an `<ng-template>` element to use the `ngxFormErrors` directive so you can place it anywhere in the template according to your needs :wink:
204204

@@ -385,7 +385,7 @@ formErrorsMessageService.addErrorMessages({
385385
});
386386
```
387387

388-
In fact, we have integrated [ngx-translate](https://github.com/ngx-translate/core) in our [demo app](../demo-app). Check it out!
388+
In fact, we have integrated [ngx-translate](https://github.com/ngx-translate/core) in our [demo app](https://github.com/NationalBankBelgium/ngx-form-errors/tree/master/demo-app). Check it out!
389389

390390
The same functionality can be achieved with any other i18n library, you just need to integrate it in your Error component :wink:
391391

@@ -466,7 +466,7 @@ getErrorMessages(): NgxValidationErrorMessages;
466466
findErrorMessage(error: string, formControlName?: string, group?: string): string | undefined;
467467
```
468468

469-
### <a name="adding-alias-globally-for-form-controls">Adding field names or alias globally
469+
### <a name="adding-alias-globally-for-form-controls"></a>Adding field names or alias globally
470470

471471
Sometimes the names of the fields in your model (and therefore in your form) are not really descriptive for the end user,
472472
in those cases you might want to display better error messages with meaningful field names.

docs/summary.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"title": "Developer Guide",
4+
"file": "DEV_GUIDE.md"
5+
}
6+
]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
"docs": "npm run docs:clean && npm run docs:generate",
9696
"docs:clean": "npx rimraf reports/api-docs",
9797
"docs:coverage": "npm run docs:generate -- --coverageTest 85 --coverageTestThresholdFail true",
98-
"docs:generate": "node ./node_modules/@compodoc/compodoc/bin/index-cli src --theme material --tsconfig ./tsconfig.json --output ./reports/api-docs/ngx-form-errors",
98+
"docs:generate": "node ./node_modules/@compodoc/compodoc/bin/index-cli src",
9999
"docs:serve": "npm run docs:generate -- --watch --serve --port 4321",
100100
"docs:publish": "bash ./gh-deploy.sh --trace",
101101
"generate:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",

0 commit comments

Comments
 (0)