Skip to content
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

[ui5-tooling-transpile] Configure interface generation jsdoc output level #1109

Open
ybbus opened this issue Oct 28, 2024 · 2 comments
Open

Comments

@ybbus
Copy link

ybbus commented Oct 28, 2024

We generate the interfaces of our custom controls using:
npx @ui5/ts-interface-generator
This is done in the precommit-hook and it generates interfaces with comments.

But in the pre-push hook we run the qunit and OPA tests and this starts up the UI5 dev server (ui5 serve) which also generates the interfaces again, but without comments.

This leaves us with a dirty local working directory on each push, what is quite annoying.

One solution would be to disable interface generation:

- name: ui5-tooling-transpile-middleware
          afterMiddleware: compression
          configuration:
              generateTsInterfaces: false

But a better solution would be, that the transpile middleware offers a configuration for the jsdoc generation.

This could lool something lilke:

- name: ui5-tooling-transpile-middleware
  afterMiddleware: compression
  configuration:
    generateTsInterfacesJSDoc: none | minimal | verbose
@petermuessig
Copy link
Member

@ybbus can you please elaborate a bit more on what you expect for the JSDoc generation? I don't get what you mean with none | minimal | verbose.

THX, Peter

@ybbus
Copy link
Author

ybbus commented Nov 5, 2024

Hi.

See: https://github.com/SAP/ui5-typescript/tree/main/packages/ts-interface-generator#commandline-options

There you can find:

--jsdoc: Set the amount of JSDoc which should be generated;
options are: none, minimal, verbose; default is verbose:...

This options should also be reflected in the ui5-tooling-transpile-middleware, so it can be set to the desired level.
Otherwise the level may missmatch the level used when manually generating the interface, thus leaving the workspace in a dirty state after starting the dev-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants