Merge branch 'live' of http://git.roojs.org/gnome.introspection-doc-generator into...
authorroot <root@buildbox.(none)>
Thu, 11 Nov 2010 23:16:08 +0000 (07:16 +0800)
committerroot <root@buildbox.(none)>
Thu, 11 Nov 2010 23:16:08 +0000 (07:16 +0800)
JSDOC/Packer.js
docs.js

index 22a3757..61092ed 100644 (file)
@@ -86,10 +86,25 @@ Packer = function(cfg)
     
     var link = false;
     if (cfg.autoBuild) {
+        
+        function dateString(d){
+            function pad(n){return n<10 ? '0'+n : n}
+            return d.getFullYear() +
+                 pad(d.getMonth()+1)+
+                 pad(d.getDate())+'_'+
+                 pad(d.getHours())+
+                 pad(d.getMinutes())+
+                 pad(d.getSeconds());
+        }
+
+        
+        
         var version = 0;
         this.files.forEach(function(f) {
             version = Math.max(File.mtime(f), version);
         });
+        var version  = dateString(new Date(version));
+        
         var dirname = GLib.path_get_dirname(this.files[0]);
         var outname = this.module ? this.module : GLib.path_get_basename(dirname);
         this.target = dirname + '/compiled/' + outname + '-' + version + '.js';
diff --git a/docs.js b/docs.js
index 137247b..18cce1c 100644 (file)
--- a/docs.js
+++ b/docs.js
@@ -163,7 +163,7 @@ langs.forEach(function(lang) {
           continue;
         }
         
-        refs = langs[lang].reference_template.process(NameSpace.references[i]);
+        refs = lang.reference_template.process(NameSpace.references[i]);
 
           // HTML to put refs into
         html =  File.read(html_file_path);