-
Notifications
You must be signed in to change notification settings - Fork 9
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: "self documenting code" based on JSDoc Support #50
Comments
A great idea. Except jsdoc2md is written in nodejs, so there is no way to "integrate" it, per-se. Most self documenting code systems focus on documenting individual functions, whereas Jsi documents at the module level. The "help" command in jsish relys on But I noticed a bug in interactive jsish where The docs in Jsi could definitely stand improvement, but I'm not sure how at this point. |
If you consider it a reasonable idea, then i think there are integration options, depending on the capabilities you want. To my mind, a JSI "self documenting support" development roadmap might be something like:
Another option to "integrate" jsdoc2md could be to create a transpile pipeline from node to JSI as a make step. I have tested the transpile approach to get node code to run on non v8 engines with some success. This approach would use tools like browserify and Babel, to automate module/library conversion from node source to JSI source. |
I think the only viable option above is jsdoc-parse, because the jsi parser does not see comments as they get stripped. You might try porting that. |
Thanks. As you may have guessed, have no time to work on this, so may pick it up later. |
One of the issues i have using modules and libraries with jsish, is that the documentation and help system, while broad, is not deep. It is also not clear how to extend the help to cover my own code. Often i have to read source in this jsish repo to get an idea of what is available and how to use it.
The self documenting concept/idea is to integrate a tool like jsdoc2md, as part of the integrated help system. The self documenting use case would extend jsish help to scan the available jsi source, (in local, vfs etc.) to build a reference manual based on available code. A jsdoc capability could also be used to dynamically document jsdoc supported external components like Vue.js. If not dynamically, then including static jsdoc to markdown step in the build step can be used to generate the Vue.js documentation for
\lib\www\md
. from unminified js source. JSDoc is based on/** .... *\
C style comments, so could also generate API docs from the C source.In principle jsdoc information could also be used to improve/extend es5lint. That is, to compare jsdoc api documentation with api implementation, something like the es5lint-plugin-jsdoc.
The text was updated successfully, but these errors were encountered: