Closed HappyHepo closed 11 months ago
I had the discussion with @akudev about this and the reason why I didn't add it is because @akudev assumes that these files are generated during the middleware usage and submitted with the code. But what I can do is to add an option to run the interface generator also during build time. WDYT?
That option would be great, as the interface files are in our gitignores and when developing our library, I often only use the builder, not the middleware.
I'll release a bit later today.
To make the generation happening, you need to set the option generateTsInterfaces
to true
:
https://github.com/ui5-community/ui5-ecosystem-showcase/blob/b761392a91b52f010302c59f7babf2ab431b1b50/showcases/ui5-tsapp/ui5.yaml#L30-L35
BTW: it's released - let me know if it works for you.
Works, when run twice. Babel does not pickup on the generated interface files from that run. Therefor the .d.ts files for the custom controls are not created, as typescript is missing the generated methods and parameters from the generated interface files.
Ah, good catch - the workspace isn't aware of the newly created resources - all these new resources need to be added to the workspace after the run...
That's strange - after testing the flow a bit more in depth, for me it always includes the gen.d.ts
files and also the d.ts
files for the custom controls are generated... Weird...
Closing for now...
I checked again with v3.3.2, the output includes the files, but the log includes some errors. Weird, but works
Is your feature request related to a problem? Please describe. The middleware includes an automatic call to the @ui5/ts-interface-generator, but the task does not.
Describe the solution you'd like Please also call the interface generator automatically from the task, when the conditions are met for the middleware.
Describe alternatives you've considered Currently a manual invocation of the interface generator is needed, when using the task.