@netwo/devkit 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/package.json +11 -1
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @netwo/devkit
|
|
2
|
+
|
|
3
|
+
The development kit of the Netwo Angular applications: the utilities shared by the applications and the libraries.
|
|
4
|
+
|
|
5
|
+
- Formatters and helpers in plain TypeScript, usable outside of Angular.
|
|
6
|
+
- RxJS operators.
|
|
7
|
+
- Angular signals, NgRx signal store features, directives, pipes and injection helpers.
|
|
8
|
+
- Angular forms validators and helpers.
|
|
9
|
+
|
|
10
|
+
| Entrypoint | Content |
|
|
11
|
+
| ----------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
12
|
+
| `@netwo/devkit` | Framework agnostic: formatters (phone numbers, addresses, file sizes…), helpers, RxJS operators and types |
|
|
13
|
+
| `@netwo/devkit/angular` | Angular: signals, signal store features, directives, pipes, injectors, providers and services |
|
|
14
|
+
| `@netwo/devkit/angular-forms` | Angular forms: validators (signal based too), a `ControlValueAccessor` directive and form helpers |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
# npm
|
|
20
|
+
npm install @netwo/devkit
|
|
21
|
+
|
|
22
|
+
# pnpm
|
|
23
|
+
pnpm add @netwo/devkit
|
|
24
|
+
|
|
25
|
+
# yarn
|
|
26
|
+
yarn add @netwo/devkit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The peer dependencies depend on the entrypoints used:
|
|
30
|
+
|
|
31
|
+
- `@netwo/devkit`: `rxjs`, `luxon` and `google-libphonenumber`,
|
|
32
|
+
- `@netwo/devkit/angular`: also `@angular/core`, `@angular/common`, `@angular/router`, `@angular/cdk`,
|
|
33
|
+
`@angular/localize`, `@ngrx/signals`, `@ngrx/component-store` and `ngxtension`,
|
|
34
|
+
- `@netwo/devkit/angular-forms`: also `@angular/forms`.
|
|
35
|
+
|
|
36
|
+
## Setup with Angular
|
|
37
|
+
|
|
38
|
+
Add the providers of the kit to the application, with the default currency of the currency pipes (`EUR` by default):
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { provideDevKitAngular } from "@netwo/devkit/angular";
|
|
42
|
+
|
|
43
|
+
export const appConfig: ApplicationConfig = {
|
|
44
|
+
providers: [provideDevKitAngular({ currencyCode: "EUR" })],
|
|
45
|
+
};
|
|
46
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netwo/devkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Netwo Angular development kit: signals, stores, forms and RxJS utilities.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"signals",
|
|
8
|
+
"signal-store",
|
|
9
|
+
"ngrx",
|
|
10
|
+
"rxjs",
|
|
11
|
+
"forms",
|
|
12
|
+
"typescript",
|
|
13
|
+
"utilities"
|
|
14
|
+
],
|
|
5
15
|
"license": "MIT",
|
|
6
16
|
"homepage": "https://www.netwo.io",
|
|
7
17
|
"sideEffects": false,
|