jsdoc2md / gulp-jsdoc-to-markdown

Plugin for jsdoc-to-markdown
https://github.com/jsdoc2md/jsdoc-to-markdown
MIT License
17 stars 3 forks source link

How to build to docs methods of class and private members #1

Closed unclechu closed 9 years ago

unclechu commented 10 years ago

How I can build to MD file members of class and private members too?

75lb commented 10 years ago

hi there.. static class members are already included in the output.. to include @private members pass the private option to the plugin:

jsdoc2md({ private: true}

if you're using the command line tool (see jsdoc-to-markdown), you would include privates like this:

$ jsdoc2md --private your/code.js

if you have any other issues, let me know..

unclechu commented 10 years ago

Ok, but it doesn't helps anyway, with {private: true} gulp-jsdoc-to-markdown still ignores private members and for some reason ignores a lot of public static class members.

You can see it here: https://github.com/unclechu/js-useful-umd-modules/blob/%22get_val%22_r10/get_val/docs/md/get_val.md But JSDoc works correctly: https://github.com/unclechu/js-useful-umd-modules/blob/%22get_val%22_r10/get_val/docs/html/GetVal.html Gulpfile: https://github.com/unclechu/js-useful-umd-modules/blob/%22get_val%22_r10/gulpfile.ls

75lb commented 10 years ago

looking into it now.. btw, what does this type expression mean? !Object.<(Object|Array)>

i'm not convinced it is valid syntax.. under the hood jsdoc parses it to Object.<Object,Array> which means an object with keys of Object type and Array values..

75lb commented 10 years ago

this issue is fixed on the next version of the tool.. will let you know once i have a preview release prepared for you to try..

unclechu commented 10 years ago

If you look at this page: http://usejsdoc.org/tags-type.html {?number} — it's nullable type. {!number} — it's non-nullable type. And see "Multiple types (type union)": "This can be a number or a boolean. {(number|boolean)}" And my !Object.<(Object|Array)> means non-nullable Object of Objects or Arrays. But it can be also: !Object.<string, (Object|Array)>, if I understand it right.

75lb commented 9 years ago

hey @unclechu .. i packaged up a pre-release version for you to play with..

install it $ npm install -g jsdoc-to-markdown@next

then try it for yourself, for example: $ jsdoc2md get_val/get_val.js

take a look at the new options: $ jsdoc2md --help

i don't have any issues with the --private option in this build, so i will close this issue.. let me know how it goes!