A demo reference project using Barrel-less Module Boundaries in Nrwl Nx with Sheriff
This project is a replica of enterprise-angular-mono-repo-patterns-example repo, but with a simplified file structure by using Sheriff. In order to reduce the amount of libraries that Enterprise Angular Mono Repo Patterns requires, Sheriff allows the grouping of feature libs and their single-dependency sub-module libs to be brought into a common hybrid feature lib, like the example diagram below:
The diagram above was originally generated using nx graph on the original enterprise-angular-mono-repo-patterns-example project, but now this project needs to use Detective to show the Sheriff-controlled dependencies.
Run npx detective
on this project to see the result.
At the moment, Detective is unable to show the containing-lib-to-child sub-module linkages at the same time as the outer lib connections. I've raised an issue about this and hope to report here on how to address it later.
Sheriff and Detective are clearly the way forward for mid-tier enterprise modularised Angular mono repos. They allow a pragmatic, modularised architecture that can still take advantage of Nx caching and affected commands whilst reducing the volume of libs that Enterprise Angular Mono Repo Patterns requires.