projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
da25560
)
docs.js
author
Alan Knowles
<alan@akkbhome.com>
Tue, 22 Jun 2010 14:32:43 +0000
(22:32 +0800)
committer
Alan Knowles
<alan@akkbhome.com>
Tue, 22 Jun 2010 14:32:43 +0000
(22:32 +0800)
docs.js
patch
|
blob
|
history
diff --git
a/docs.js
b/docs.js
index
85f82a0
..
f9d64a7
100644
(file)
--- a/
docs.js
+++ b/
docs.js
@@
-23,27
+23,33
@@
if (!outputdir) {
};
}
};
}
+
if (!File.isDirectory(outputdir)) {
console.log("Creating directory " + outputdir);
File.mkdir(outputdir);
};
if (!File.isDirectory(outputdir)) {
console.log("Creating directory " + outputdir);
File.mkdir(outputdir);
};
-// list namespace..
-//var ns_list = [ 'GIRepository' ];
-
-
+
+// Which libraries to build.
var ns_list = Introspect.namespaces();
if (typeof(Seed.argv[3]) == 'string') {
console.log(Seed.argv.length);
ns_list = Seed.argv[3].split(',');
}
var ns_list = Introspect.namespaces();
if (typeof(Seed.argv[3]) == 'string') {
console.log(Seed.argv.length);
ns_list = Seed.argv[3].split(',');
}
-
+
ns_list = ns_list.sort();
ns_list = ns_list.sort();
+
+// which languages do we want to output for.
+
+
var cls_template = new Template(__script_path__ + '/templates/class.html');
var cls_ix_template = new Template(__script_path__ + '/templates/class_ix.html');
var reference_template = new Template(__script_path__ + '/templates/references.html');
var cls_template = new Template(__script_path__ + '/templates/class.html');
var cls_ix_template = new Template(__script_path__ + '/templates/class_ix.html');
var reference_template = new Template(__script_path__ + '/templates/references.html');
+
+
+
var ns_idx = [];
ns_list.forEach(function(ns_name)
{
var ns_idx = [];
ns_list.forEach(function(ns_name)
{
@@
-63,6
+69,7
@@
ns_list.forEach(function(ns_name)
ns['left_bar'] = cls_ix_template.process(ns);
ns['left_bar'] = cls_ix_template.process(ns);
+ // namespace template
Gio.simple_write(outputdir + '/'+ ns_name + '.html', cls_template.process(ns));
// left bar index of elements in namespace...
Gio.simple_write(outputdir + '/'+ ns_name + '.html', cls_template.process(ns));
// left bar index of elements in namespace...
@@
-81,6
+88,8
@@
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) {
// 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(
Gio.simple_write(outputdir + '/'+ ns_name + '.' + n + '.html',
cls_template.process(
XObject.extend(