"--exclude-src" : 'Ex',
"--baseDir" : 'Base Directory (root directory of code)',
"--target" : 'Target Directory (where html files go)',
- "--cacheDirectory": 'Cached Files Directory',
+ "--cacheDirectory": 'Cached Files Directory (or blank to not cache)',
"--conf" : 'Read From a Configuration file', // was c. - configuration file.. - parsed with JSON.parse
"--templateDir" : 'Template Directory', // was t.
// "recurse": false, // was r. - not supported..
"disablecache": '', // was C
"define" : [], // was D.
"handler" : [], // was H -- not supported..
+
+
+ "version" : "1.0",
+ "copyright" : "LGPL",
+
LOG : {
warn : function(str) {
print("Warn: " +str );
if (!v.length || v[0] != '/') {
v = _this.baseDir + (v.length ? '/' + v : '');
}
- if (!File.isDirectory(v)) {
+ if (!File.exists(v)) {
throw {
name: "ArgumentError",
message: "invalid Source Directory : " + v
};
}
if (this.templateDir[0] !='/') {
- this.templateDir = this.baseDir + '/' + this.template;
+ this.templateDir = this.baseDir + '/' + this.templateDir;
}
message: "No directory specified"
};
}
-
+
+ //print(JSON.stringify(this, null,4));
// should cacheDirectory be a subdirectory of target??
// if not set..
i++;
while(i < args.length)
{
- if (args[i].substring(0,2) != '--'){
-
+ if (args[i].substring(0,2) == '--'){
+ i--;
break;
}
this[a].push(args[i]);
+ i++;
}
- i--;
+
+ continue;
}
throw {
name: "ArgumentError",
- message: "Do not know how to handle: " + a
+ message: "Do not know how to handle: " + a + ' ' + typeof(this[a])
};
}