diff --git a/README.md b/README.md index 920350d..12298e5 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ For the detailed documentation go to [**https://error.angular-package.dev**](htt * [Skeleton](#skeleton) * [Installation](#installation) * [Changelog](#changelog) +* [Api](#api) * [Git](#git) * [Commit](#commit) * [Versioning](#versioning) @@ -75,18 +76,17 @@ For the detailed documentation go to [**https://error.angular-package.dev**](htt ## Skeleton -This package was built by the [library skeleton][skeleton] which was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.5. - -Copy this package to the `packages/error` folder of the [library skeleton][skeleton] then run the commands below. +The package was generated by the [library skeleton][skeleton] which was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0. +Copy package to the `packages/error` folder of the [library skeleton][skeleton] then run the commands below. ### Code scaffolding -Run `ng generate component component-name --project error` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project storage`. +Run `ng generate component component-name --project error` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project error`. > Note: Don't forget to add `--project error` or else it will be added to the default project in your `angular.json` file. ### Build -Run `ng build error` to build the package. The build artifacts will be stored in the `dist/` directory. +Run `ng build error` to build the package. The build artifacts will be stored in the `dist/error` directory. ### Publishing @@ -94,10 +94,10 @@ After building your library with `ng build error`, go to the dist folder `cd dis ### Running unit tests -Install `@angular-package/testing` with command: +Before the test can be performed install `@angular-package/testing` and `@angular-package/type` with command: ```typescript -npm i @angular-package/testing --no-save +npm i @angular-package/testing @angular-package/type --no-save ``` Run `ng test error` to execute the unit tests via [Karma](https://karma-runner.github.io). @@ -114,6 +114,26 @@ npm i @angular-package/error --save
+## Api + +```typescript +import { + // Class. + CommonError, + CommonErrors, + Error, + Errors, + RangeError, + RangeErrors, + TypeError, + TypeErrors, + ValidationError, + ValidationErrors +} from '@angular-package/error'; +``` + +
+ ## Changelog The **changelog** of this package is based on [*keep a changelog*](https://keepachangelog.com/en/1.0.0/). To read it, click on the [CHANGELOG.md](https://github.com/angular-package/error/blob/main/CHANGELOG.md) link.