-
Notifications
You must be signed in to change notification settings - Fork 57
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
Feature Request > Generate shared libraries #15
Comments
According to the type: Maybe it makes sense to use a different underlying schematic for type UI and type util. Util libs might also work fine as a nrwl workspace lib and not as an nrwl angular lib. Not sure though. |
I like this idea. I would also go with 2 separate schematics to align with the other ones. In this case we had:
Can we just use --domain shared to indicate we are referring to the shared kernel? According to #12, a --directory switch might be useful anyway. I'm wondering what to do if we use I see two options:
I'd rather go with 1) What do you think? |
Separate schematics: Shared option:
Customize directory: Naming of the libs: |
Good point. In this case let's go with If someone is not aware of this, they We can also provide a schematic for the shell. Let's also use the prefixes, you mention (util, ui, api, shell) |
Btw: Nrwl resolved this issue here and demands us to provide an E. g. I's suggest to replace all slashes beginning with the 2nd one with a dash. E.g. In the case of |
Ah, good to know. Sounds good. |
Cool. Looking forward. Btw: Just played around with it. We need this |
Just released a new version. https://github.com/angular-architects/nx-ddd-plugin/releases/tag/1.0.5 This is to avoid breaking changes until we set |
As mentioned in your article series, shared libraries can and should be used to share logic, which does not belong to a specific domain, like technical stuff (authenticaton, ...).
Since the nx ddd plugin adds a lot of constraints to the tslint.json, generating a shared lib via the nrwl schematics would require the developer to add a tag for the type and to add a tag for the domain (--> shared). Otherwise, the shared lib can not be used within the generated libs by this plugin.
I think, it would make sense to add a schematic which creates a shared lib for you with
In the end, this would enforce a meaningful folder structure and it would free the dev from adding those tags manually. Especially DEVs not used to the nx linting rules might have problems solving the issue, when the tags are missing.
Please let me know, what you think. I'd be happy to support with a PR again.
The text was updated successfully, but these errors were encountered: