idx[i]= ns_name == 'GLib' ? 1 : ns[i].length ;
ns[i].forEach( function(n) {
var odata = XObject.extend(
- Introspect.factory(actions[i], ns_name, n),
- { 'left_bar' :ns['left_bar'] }
- )
+ 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)
)
var html = ''
// output cross reference data..
-
-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;
- }
+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(/\<!--references--\>/, refs);
+ // HTML to put refs into
+ html = File.read(html_file_path);
- // write back to file
- Gio.simple_write(html_file_path, html);
+ // do the replacement
+ html = html.replace(/\<!--references--\>/, refs);
-}
+ // write back to file
+ Gio.simple_write(html_file_path, html);
-var ix_template = new Template(__script_path__ + '/templates/index.html');
-Gio.simple_write(outputdir + '/index.html', ix_template.process(ns_idx));
-File.silentRecursiveCopy(__script_path__ + '/templates/resources/', outputdir, Gio.FileCopyFlags.OVERWRITE);
+ }
+);
+
+// set up index and resources.
+langs.forEach(function(lang) {
+ var ix_template = new Template(__script_path__ + '/templates/' + lang.name + '/index.html');
+ Gio.simple_write(outputdir + '/' + lang.name + '/index.html', ix_template.process(ns_idx));
+ File.silentRecursiveCopy(__script_path__ + '/templates/resources/', outputdir + '/' lang.name , Gio.FileCopyFlags.OVERWRITE);
+});
\ No newline at end of file