steveush / foodoc

A Bootstrap and Handlebars based JSDoc3 template.
GNU General Public License v3.0
24 stars 14 forks source link

missing globals.html with typedefs #5

Closed cancerberoSgx closed 6 years ago

cancerberoSgx commented 6 years ago

Given the following file (test.js)

/**
 * Some class
 * @class
 * @global
 */
class A {
    /**
     * some method
     * @param {SomeType} p
     */
    method1(p){
    }
}
/**
 * @typedef {Object} SomeType
 * @property {String} someProp
 */

if you generate documentation with the command jsdoc test.js (no foodoc) everything is OK, in A.html, you have a link to SomeType that goes to global.html#SomeType and it works

if you generate jsdocs with foodoc (command jsdoc test.js -t node_modules/foodoc/template/ then in A.html there is the same link that goes to the same location (global.html#SomeType) but the file globals.html is missing.

The workaround I'm currently doing is generating both documentations so at least I have the globals.html file from the original template, i.e: jsdoc test.js && jsdoc test.js -t node_modules/foodoc/template/

Sorry I don't have the time to investigate this issue further... Thanks

joshua-golub commented 6 years ago

@cancerberoSgx, did you ever find a solution to this? I am having the same problem -- foodoc isn't generating the documentation for my global functions. My previous template (ink-docstrap) did.

cancerberoSgx commented 6 years ago

the workaround i found is compiling twice, one using foodoc and the other without it - so the global page is generated but with the old original template, something like this:

    node node_modules/jsdoc/jsdoc.js -c jsdoc-extlayer-frontend-config.json
    node node_modules/jsdoc/jsdoc.js -c jsdoc-extlayer-frontend-config.json -t node_modules/foodoc/template
Dhyey commented 6 years ago

Any updates on this ? I too can't find page that documents all my typedefs.

cancerberoSgx commented 6 years ago

I will try to make a PR for this since this template is very cool and this is a serious issue. will keep you posted

cancerberoSgx commented 6 years ago

So there's my PR - is ugly but better than nothing.I guess you can work with my clone until author fix it or merge it.: https://github.com/cancerberoSgx/foodoc

steveush commented 6 years ago

Hi Guys,

Apologies this took so long to get to, the PR notification from @cancerberoSgx finally got my arse in gear and I think I have resolved this issue in the latest version 0.0.9. Please try it out and let me know.

Thanks

cancerberoSgx commented 6 years ago

just tried it in my big reference API full of global datatypes . Good job! keep it up!