Typescript and JSDoc

Đang mở
#739 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
babel, javascript, typescript

Hướng nghiên cứu

Start by examining the built-in ui5 build jsdoc task and the Babel transformation from TypeScript to JavaScript. Compare the available approaches—processing TypeScript sources, preserving comments, or documenting a separate workflow—and define which supported behavior should produce JSDoc artifacts before implementing or documenting it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Is your feature request related to a problem? Please describe.

UI5 cli offers a built-in task for generating JSDoc: ui5 build jsdoc

While this works for JS based UI5 projects, this task won't work for a TypeScript project. Here, the TS coding is transformed by babel to JavaScript and the comments are removed. Using now the jsdoc task will result in no JSDoc being generated, as the JS source files in webapp do not contain the needed JSDoc comments. Even when the TS sources contain valid JSDoc comments, no JSDoc artifacts are generated using ui5 tooling.

Describe the solution you'd like

Maybe ui5 tooling can include support for JSDoc in TS files? So that ui5 build jsdoc is able to generate the JSDoc artifacts from the TS source? Or maybe include the usage of typedoc in the docs? In that case, maybe it is better to completely remove support for JSDoc from the ui5 tooling and inform the user to generate it manually in a seperate build step?

Describe alternatives you've considered

Include the JSDoc comments in the TS to JS transformation so the jsdoc works on the generated JS sources. This should not be considered as the doc is for the TS source and might inlcude TS specific information. Also, the documentation should be created for what the developer writes, and not on generated JS files. An alternative is to remove JSDoc from ui5 tooling and let the user generate the docs in a seperate build step (manually or via a build pipeline). Not using JSdoc at all is not an option, as the documentation is an important asset.

Ngôn ngữ chính
JavaScript
Star
510
Fork
80
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của UI5/cli

Tất cả issue của UI5/cli

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.