From: alan Date: Sun, 18 Apr 2010 14:44:05 +0000 (+0800) Subject: docs.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=8a6ce52283c2e5f8e5a44e247a2063641c7091f9 docs.js --- diff --git a/docs.js b/docs.js index 10f1f11..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,6 +67,7 @@ ns_list.map(function(ns_name) }; for (var i in actions) { + idx[i]= ns[i].length; ns[i].map( function(n) { Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.html', cls_template.process( @@ -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);