-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[CLI] Generating index.ts
in each models/repositories/controllers automatically
#1127
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
Comments
Do we still want this with pattern with That said someone might still want to import a class for type information |
I'd say we still want this so that users can easily import them to unit/integration test. That being said, I'm not sure if this is something we NEED to have. |
Currently if I want to reference some model in |
If we are generating the artifacts, this part should be easy. +1 for it. |
The complexity comes into play when we add the 2nd controller. To maintain |
That sounds easy enough for me; check the content of |
i thought we are going to have a separate export statement for each class? then if it exists, then we have to append from what's existing.
|
Well, when a new artifact is generated using |
Discussed with @bajtos , what's in scope for |
This isn't anything particularly difficult about implementing this IMO. Here's some modules we can leverage to accomplish this task: |
@virkt25 nice! I'd rather avoid using modules in 0.x version, that leaves only one candidate: https://www.npmjs.com/package/create-ts-index Originally, I was thinking about editing |
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
fix #1127 Signed-off-by: Taranveer Virk <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Description / Steps to reproduce / Feature proposal
In an LB4 app (e.g. in
example-getting-started
example), it seems like the general pattern is to have the export statements in theindex.ts
file in each folders (models/repositories/controllers), so that the classes in those folders can simply be imported byimport {SomeClass} from "../models";
Acceptance Criteria
I wonder if this is a good idea to:
lb4 app
commandlb4 controller
), add the export in index.tse.g.
export * from './someclass.repository';
The text was updated successfully, but these errors were encountered: