X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs.js;h=9755ebe76869bd791206f21af5d597792894dd74;hb=8b882e6abb3281639eea6cb3850054af2550f6ce;hp=236104255993247e3c30452c969f114354691754;hpb=bd23da659f79148fd4befb53701cdfc0d8766cc0;p=gnome.introspection-doc-generator diff --git a/docs.js b/docs.js index 2361042..9755ebe 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,8 @@ ns_list.map(function(ns_name) }; for (var i in actions) { - ns.objects.map( function(n) { + idx[i]= ns[i].length; + ns[i].map( function(n) { Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.html', cls_template.process( Object.extend( @@ -84,7 +81,7 @@ ns_list.map(function(ns_name) console.log(ns_name + '.' +n); }); } - + ns_idx.push(idx); }); @@ -119,7 +116,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);