X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FBuildDocs.js;h=85f33ac36abca939f4d2cd70bcf72f75114473f0;hb=7d79987b2c0f1b02a8823dcc95764d787e4c91e4;hp=e0f964841fbcdfe28020f921424e2c5c46c836c6;hpb=e21974dde41fd573a4bd846e7e74605f3017628f;p=gnome.introspection-doc-generator diff --git a/JSDOC/BuildDocs.js b/JSDOC/BuildDocs.js index e0f9648..85f33ac 100644 --- a/JSDOC/BuildDocs.js +++ b/JSDOC/BuildDocs.js @@ -3,13 +3,13 @@ This is the main container for the JSDOC application. @namespace */ - +Gio = imports.gi.Gio; XObject = imports.XObject.XObject; File = imports.File.File; Template = imports.JsTemplate.Template.Template; - +Link = imports.JsTemplate.Link.Link; // ?? fixme!?? Parser = imports.Parser.Parser; TextStream = imports.TextStream.TextStream; @@ -175,38 +175,38 @@ BuildDocs = { File.mkdir(Options.target +"/json"); } - Options.LOG.inform("Copying files from static:" +Options.templatesDir); + Options.LOG.inform("Copying files from static: " +Options.templateDir); // copy everything in 'static' into - File.list(Options.templatesDir + '/static').forEach(function (f) { - Options.LOG.inform("Copy " + Options.templatesDir + '/static/' + f + ' to ' + Options.target + '/' + f); - File.copy(Options.templatesDir + '/static/' + f, Options.target + '/' + f); + File.list(Options.templateDir + '/static').forEach(function (f) { + Options.LOG.inform("Copy " + Options.templateDir + '/static/' + f + ' to ' + Options.target + '/' + f); + File.copyFile(Options.templateDir + '/static/' + f, Options.target + '/' + f, Gio.FileCopyFlags.OVERWRITE); }); Options.LOG.inform("Setting up templates"); // used to check the details of things being linked to - Link.symbolSet = symbolSet; + Link.symbolSet = this.symbolSet; Link.base = "../"; var classTemplate = new Template({ - templateFile : Options.templatesDir + "/class.tmpl", + templateFile : Options.templateDir + "/class.tmpl", Link : Link }); var classesTemplate = new Template({ - templateFile : Options.templatesDir +"/allclasses.tmpl", + templateFile : Options.templateDir +"/allclasses.tmpl", Link : Link }); var classesindexTemplate = new Template({ - templateFile : Options.templatesDir +"/index.tmpl", + templateFile : Options.templateDir +"/index.tmpl", Link : Link }); var fileindexTemplate = new Template({ - templateFile : Options.templatesDir +"/allfiles.tmpl", + templateFile : Options.templateDir +"/allfiles.tmpl", Link: Link }); - classTemplate.symbolSet = symbolSet; + classTemplate.symbolSet = this.symbolSet; function hasNoParent($) { @@ -219,7 +219,7 @@ BuildDocs = { return ($.is("CONSTRUCTOR") || $.isNamespace); } - var symbols = symbolSet.toArray(); + var symbols = this.symbolSet.toArray(); var files = Options.srcFiles; @@ -352,11 +352,12 @@ BuildDocs = { { - name = sourceFile.substring(Options.baseDir.length); + name = sourceFile.substring(Options.baseDir.length+1); name = name.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); - name = name.replace(/\:/g, "_"); //?? + name = name.replace(/\:/g, "_"); //?? + Options.LOG.inform("Write Source file :" + sourceFile); var pretty = imports.PrettyPrint.toPretty(File.read(sourceFile)); File.write(Options.target+"/symbols/src/" + name, '' +