X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=docs.js;h=cc826868eca7bd3f5c31074b9cd0fd17d5d9fa40;hp=236104255993247e3c30452c969f114354691754;hb=refs%2Fheads%2F%3Da;hpb=bd23da659f79148fd4befb53701cdfc0d8766cc0 diff --git a/docs.js b/docs.js index 2361042..cc82686 100644 --- a/docs.js +++ b/docs.js @@ -37,16 +37,16 @@ if (typeof(Seed.argv[3]) == 'string') { ns_list = Seed.argv[3].split(','); } -ns_list = ns_list .sort(); -var cls_list = []; +ns_list = ns_list.sort(); + var cls_template = new JSDOC.Template(__script_path__ + '/docs/class.html'); var cls_ix_template = new JSDOC.Template(__script_path__ + '/docs/class_ix.html'); var reference_template = new JSDOC.Template(__script_path__ + '/docs/references.html'); - +var ns_idx = []; ns_list.map(function(ns_name) { var core = imports.gi[ns_name]; - + var idx = { name: ns_name}; console.log("START:" + ns_name); var ns = Introspect.ns(ns_name); @@ -54,10 +54,6 @@ ns_list.map(function(ns_name) Gio.simple_write(outputdir + '/'+ ns_name + '.html', cls_template.process(ns)); - cls_list.push({ - alias : ns_name - }); - // left bar index of elements in namespace... Gio.simple_write(outputdir + '/_ix_'+ ns_name + '.shtml', cls_ix_template.process(ns)); @@ -71,7 +67,9 @@ ns_list.map(function(ns_name) }; for (var i in actions) { - ns.objects.map( function(n) { + // we flag GLib as a GObject lib... + idx[i]= ns_name == 'GLib' ? 1 : ns[i].length ; + ns[i].map( function(n) { Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.html', cls_template.process( Object.extend( @@ -84,7 +82,7 @@ ns_list.map(function(ns_name) console.log(ns_name + '.' +n); }); } - + ns_idx.push(idx); }); @@ -119,7 +117,7 @@ for (var i in Introspect.references) { } var ix_template = new JSDOC.Template(__script_path__ + '/docs/index.html'); -Gio.simple_write(outputdir + '/index.html', ix_template.process(ns_list)); +Gio.simple_write(outputdir + '/index.html', ix_template.process(ns_idx)); File.silentRecursiveCopy(__script_path__ + '/docs/resources/', outputdir);