Template = imports.JsTemplate.Template.Template;
-Options = imports.Options.Options;
-Parser = imports.Parser.Parser;
+Parser = imports.Parser.Parser;
+TextStream = imports.TextStream.TextStream;
TokenReader = imports.TokenReader.TokenReader;
TokenStream = imports.TokenStream.TokenStream;
Symbol = imports.Symbol.Symbol;
// should not realy be here -- or anywhere...??
-
+Options = false; // refer to this everywhere!
BuildDocs = {
srcFiles : [],
+
build : function (opts)
{
-
- XObject.extend(Options, opts);
-
+ Options = opts;
Options.init();
-
-
Options.LOG.inform("JsDoc Toolkit main() running at "+new Date()+".");
//Options.LOG.inform("With options: ");
- if (!File.isDirectory(Options.cacheDirectory)) {
+ if (Options.cacheDirectory.length && !File.isDirectory(Options.cacheDirectory)) {
File.mkdir(Options.cacheDirectory)
}
var src = ''
try {
+ Options.LOG.warn("reading : " + srcFile);
src = File.read(srcFile);
}
catch(e) {
continue;
}
-
- var tr = new TokenReader();
- var ts = new TokenStream(tr.tokenize(src));
+ var txs = new TextStream(src);
+
+ var tr = new TokenReader({ keepComments : true, keepWhite : true });
+ var ts = new TokenStream(txs);
Parser.parse(ts, srcFile);
Parser.finish();
- }
+ },
},
- publishJSON = function(file, data)
+ publishJSON : function(file, data)
{
// what we need to output to be usefull...
// a) props..