Skip to content

Commit d832f17

Browse files
committed
resolve merge conflicts
2 parents 153dea4 + e442ba9 commit d832f17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2840
-15837
lines changed

.eslintrc

Lines changed: 0 additions & 43 deletions
This file was deleted.

.eslintrc.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"root": true,
3+
"plugins": ["@nrwl/nx"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"parserOptions": {
8+
"project": "./tsconfig.*?.json"
9+
},
10+
"rules": {
11+
"@nrwl/nx/enforce-module-boundaries": [
12+
"error",
13+
{
14+
"enforceBuildableLibDependency": true,
15+
"allow": [],
16+
"depConstraints": [
17+
{
18+
"sourceTag": "*",
19+
"onlyDependOnLibsWithTags": ["*"]
20+
}
21+
]
22+
}
23+
]
24+
}
25+
},
26+
{
27+
"files": ["*.ts", "*.tsx"],
28+
"extends": ["plugin:@nrwl/nx/typescript"],
29+
"parserOptions": {
30+
"project": "./tsconfig.*?.json"
31+
},
32+
"rules": {}
33+
},
34+
{
35+
"files": ["*.js", "*.jsx"],
36+
"extends": ["plugin:@nrwl/nx/javascript"],
37+
"rules": {}
38+
}
39+
]
40+
}

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"ms-vscode.vscode-typescript-tslint-plugin",
4-
"esbenp.prettier-vscode"
4+
"esbenp.prettier-vscode",
5+
"firsttris.vscode-jest-runner"
56
]
67
}

apps/ddd-e2e/jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
name: 'ddd-e2e',
33
preset: '../../jest.config.js',
4-
coverageDirectory: '../../coverage/appsddd-e2e'
4+
coverageDirectory: '../../coverage/appsddd-e2e',
55
};

apps/ddd-e2e/tests/ddd.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import {
33
ensureNxProject,
44
readJson,
55
runNxCommandAsync,
6-
uniq
6+
uniq,
77
} from '@nrwl/nx-plugin/testing';
88
describe('ddd e2e', () => {
9-
it('should create ddd', async done => {
9+
it('should create ddd', async (done) => {
1010
const plugin = uniq('ddd');
1111
ensureNxProject('@angular-architects/ddd', 'dist/libs/ddd');
1212
await runNxCommandAsync(`generate @angular-architects/ddd:ddd ${plugin}`);
@@ -18,7 +18,7 @@ describe('ddd e2e', () => {
1818
});
1919

2020
describe('--directory', () => {
21-
it('should create src in the specified directory', async done => {
21+
it('should create src in the specified directory', async (done) => {
2222
const plugin = uniq('ddd');
2323
ensureNxProject('@angular-architects/ddd', 'dist/libs/ddd');
2424
await runNxCommandAsync(
@@ -32,7 +32,7 @@ describe('ddd e2e', () => {
3232
});
3333

3434
describe('--tags', () => {
35-
it('should add tags to nx.json', async done => {
35+
it('should add tags to nx.json', async (done) => {
3636
const plugin = uniq('ddd');
3737
ensureNxProject('@angular-architects/ddd', 'dist/libs/ddd');
3838
await runNxCommandAsync(

jest.config.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
module.exports = {
2-
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
3-
transform: {
4-
'^.+\\.(ts|js|html)$': 'ts-jest'
5-
},
6-
resolver: '@nrwl/jest/plugins/resolver',
7-
moduleFileExtensions: ['ts', 'js', 'html'],
8-
coverageReporters: ['html']
2+
projects: ['<rootDir>/libs/ddd'],
93
};

jest.preset.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const nxPreset = require('@nrwl/jest/preset');
2+
module.exports = {
3+
...nxPreset,
4+
testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
5+
transform: {
6+
'^.+\\.(ts|js|html)$': 'ts-jest',
7+
},
8+
resolver: '@nrwl/jest/plugins/resolver',
9+
moduleFileExtensions: ['ts', 'js', 'html'],
10+
coverageReporters: ['html'],
11+
};
File renamed without changes.

libs/ddd/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ The generated access restrictions prevent unwanted access between libraries resp
1414
- ⚙️ Generating feature libraries including a feature components using the facades
1515
- 🙅‍♂️ Adding linting rules for access restrictions between domains as proposed by Nrwl
1616
- 🙅‍♀️ Adding linting rules for access restrictions between layers as proposed by Nrwl (supports tslint and eslint)
17-
- 🔥 Optionally generates skeleton for NGRX and integrates it into the DDD design (``--ngrx`` switch)
17+
- 🔥 Optionally generates skeleton for NGRX and integrates it into the DDD design (`--ngrx` switch)
1818

1919
### Features Overview Video
20-
<a href="https://www.youtube.com/watch?v=39JLXMEE7Ds" target="_blank">![Screenshot of Overview Video](https://i.imgur.com/VlTRE80.png)</a>
2120

21+
<a href="https://www.youtube.com/watch?v=39JLXMEE7Ds" target="_blank">![Screenshot of Overview Video](https://i.imgur.com/VlTRE80.png)</a>
2222

2323
## Usage
2424

@@ -38,16 +38,15 @@ ng g @angular-architects/ddd:feature cancel --domain booking
3838
ng g @angular-architects/ddd:feature manage --domain boarding
3939
```
4040

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

4343
```
4444
ng g @angular-architects/ddd:domain booking --addApp --ngrx
4545
ng g @angular-architects/ddd:feature search --domain booking --entity flight --ngrx
4646
[...]
4747
```
4848

49-
50-
This example assumes that you have an app ``flight-app`` in place.
49+
This example assumes that you have an app `flight-app` in place.
5150

5251
These schematics also wire up the individual libs. To see the result, create a dependency graph:
5352

@@ -57,7 +56,7 @@ npm run dep-graph
5756

5857
![dependency graph](https://github.com/angular-architects/nx-ddd-plugin/blob/master/libs/ddd/assets/ddd.png?raw=true)
5958

60-
To see that the skeleton works end-to-end, call the generated feature component in your ``app.component.html``:
59+
To see that the skeleton works end-to-end, call the generated feature component in your `app.component.html`:
6160

6261
```html
6362
<booking-search></booking-search>
@@ -79,7 +78,7 @@ The domain layer is subdivided into three parts:
7978

8079
### Generated Structure for Domain Library
8180

82-
- **application:** Contains application services. This is a DDD term for what we call facades in Angular nowadays. They orchestrate everything for a use case given so that a feature component only needs to communicate with one such facade. Also, it hides details for state management. While the generates facades just use a ``BehaviorSubject``, feel free to add a library like NGRX underneath. As such a modifications changes nothing from the component's perspective, you can use facades to introduce NGRX later on demand.
81+
- **application:** Contains application services. This is a DDD term for what we call facades in Angular nowadays. They orchestrate everything for a use case given so that a feature component only needs to communicate with one such facade. Also, it hides details for state management. While the generates facades just use a `BehaviorSubject`, feel free to add a library like NGRX underneath. As such a modifications changes nothing from the component's perspective, you can use facades to introduce NGRX later on demand.
8382
- **entities:** Client-side data model including logic operating on it (like validations).
8483
- **infrastructure:** Services for communicating with the backend.
8584

@@ -102,6 +101,7 @@ see https://github.com/angular-architects/ddd-demo
102101
- [Our eBook on Angular and architectures](https://leanpub.com/enterprise-angular)
103102
- [Thomas Burlison's article about facades in Angular](https://medium.com/@thomasburlesonIA/push-based-architectures-with-rxjs-81b327d7c32d)
104103

105-
## More
104+
## More
105+
106106
- [Angular Architecture Workshop](https://www.angulararchitects.io/en/angular-workshops/advanced-angular-enterprise-architecture-incl-ivy/)
107107
- [Follow us on Twitter](https://twitter.com/ManfredSteyer)

libs/ddd/collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
"description": "adds a utility library to a domain or as a shared library"
2929
}
3030
}
31-
}
31+
}

0 commit comments

Comments
 (0)