Skip to content

Commit 0949fe5

Browse files
committedFeb 27, 2023
docs: added example code snipper to 'Enforcing architecture` section
1 parent bc798c1 commit 0949fe5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎README.md

+15
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,21 @@ To make sure everyone in the team adheres to defined architectural practices, us
12101210

12111211
For example:
12121212

1213+
```typescript
1214+
// Dependency cruiser example
1215+
{
1216+
name: 'no-domain-to-app-deps',
1217+
comment: 'Domain layer cannot depend on application layer',
1218+
severity: 'error',
1219+
from: { path: 'domain' },
1220+
to: { path: ['application'] },
1221+
},
1222+
```
1223+
1224+
Snippet of code above will prevent your domain layer to depend on the application layer.
1225+
1226+
Example tools:
1227+
12131228
- [Dependency cruiser](https://github.com/sverweij/dependency-cruiser) - Validate and visualize dependencies for JavaScript / TypeScript.
12141229
- [ArchUnit](https://www.archunit.org/) - library for checking the architecture of Java applications
12151230

0 commit comments

Comments
 (0)
Failed to load comments.