X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs.js;h=386f14dbd8a0a1e6c69d979df7d086284b16ecd3;hb=354f8e6831cfb8cf2a788c8fcf01f343d193cd08;hp=6181d5f378cf3bc59ceca7af213a932b8109bdb3;hpb=5547c7669c0b630775868e6ef9b07545e4466563;p=gnome.introspection-doc-generator diff --git a/docs.js b/docs.js index 6181d5f..386f14d 100644 --- a/docs.js +++ b/docs.js @@ -108,17 +108,15 @@ ns_list.forEach(function(ns_name) // we flag GLib as a GObject lib... idx[i]= ns_name == 'GLib' ? 1 : ns[i].length ; ns[i].forEach( function(n) { - - - Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.html', - cls_template.process( - XObject.extend( - Introspect.factory(actions[i], ns_name, n), - { 'left_bar' :ns['left_bar'] } - ) + var odata = XObject.extend( + Introspect.factory(actions[i], ns_name, n), + { 'left_bar' :ns['left_bar'] } + ); + langs.forEach(function(lang) { + Gio.simple_write(outputdir + '/'+ lang.name + '/' + ns_name + '.' + n + '.html', + lang.cls_template.process(odata) ) - ) - + }); console.log(ns_name + '.' +n); }); } @@ -130,32 +128,40 @@ var refs = ''; var html_file_path = ''; var html = '' - -for (var i in Introspect.references) { - html_file_path = File.join(outputdir, i + '.html'); - - if (i == 'undefined') { - console.log("Undefined name space - ignored"); - continue; - } - if (!File.isFile(html_file_path)) { - console.log("No HTML file " + html_file_path + " to insert references into - ignored"); - continue; - } +// output cross reference data.. +langs.forEach(function(lang) { - refs = reference_template.process(Introspect.references[i]); - - // HTML to put refs into - html = File.read(html_file_path); + for (var i in Introspect.references) { + + html_file_path = [ outputdir, lang.name, i + '.html'].join('/'); + + if (i == 'undefined') { + console.log("Undefined name space - ignored"); + continue; + } + + if (!File.isFile(html_file_path)) { + console.log("No HTML file " + html_file_path + " to insert references into - ignored"); + continue; + } + + refs = langs.reference_template.process(Introspect.references[i]); - // do the replacement - html = html.replace(/\