Skip to content

docs: adapt console commands to version 16 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions libs/ddd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,37 @@ The generated access restrictions prevent unwanted access between libraries resp
Add this plugin to a Nx workspace:

```
npm i @angular-architects/ddd
ng g @angular-architects/ddd:init
npm i -D @angular-architects/ddd
nx g @angular-architects/ddd:init
```

Instead, you can also use ng add, however, Nx currently emits a warning when using ng add:
Instead of `init` You can also use `ng-add`:

```
nx add @angular-architects/ddd
npx nx g @angular-architects/ddd:ng-add
```

Add domains and features manually:

```
ng g @angular-architects/ddd:domain booking --addApp
ng g @angular-architects/ddd:domain boarding --addApp
ng g @angular-architects/ddd:feature search --domain booking --entity flight
ng g @angular-architects/ddd:feature cancel --domain booking
ng g @angular-architects/ddd:feature manage --domain boarding
nx g @angular-architects/ddd:domain booking --addApp
nx g @angular-architects/ddd:domain boarding --addApp
nx g @angular-architects/ddd:feature search --domain booking --entity flight
nx g @angular-architects/ddd:feature cancel --domain booking
nx g @angular-architects/ddd:feature manage --domain boarding
```

To get a list of generators, you can use:

```
nx list @angular-architects/ddd
```

For NGRX support, just add the `--ngrx` switch:

```
ng g @angular-architects/ddd:domain luggage --addApp --ngrx
ng g @angular-architects/ddd:feature checkin --domain luggage --entity luggage-list --ngrx
nx g @angular-architects/ddd:domain luggage --addApp --ngrx
nx g @angular-architects/ddd:feature checkin --domain luggage --entity luggage-list --ngrx
[...]
```

Expand All @@ -59,7 +65,7 @@ This example assumes that you have an app `flight-app` in place.
These schematics also wire up the individual libs. To see the result, create a dependency graph:

```
npm run dep-graph
nx graph
```

![dependency graph](https://github.com/angular-architects/nx-ddd-plugin/blob/master/libs/ddd/assets/ddd.png?raw=true)
Expand All @@ -79,9 +85,9 @@ You don't need any TypeScript or Angular imports. The plugin already took care a
All generators have a switch ``--standalone`` to support Standalone Components:

```
ng g @angular-architects/ddd:domain booking --addApp --standalone
nx g @angular-architects/ddd:domain booking --addApp --standalone

ng g @angular-architects/ddd:feature search --domain booking --entity flight --standalone
nx g @angular-architects/ddd:feature search --domain booking --entity flight --standalone
```

Don't mix Standalone Components and traditional ones within the same domain.
Expand Down