* Options management...
*/
XObject = import.XObject.XObject;
-XObject = import.File.File;
+File = import.File.File;
+
Options = {
"files" : [], // was _
"directory" : '', // was d.
"conf" : '', // was c.
"template": '', // was t.
- "recurse": '', // was r.
+ "recurse": false, // was r.
"ext": '', // was x.
"private": '', // was p
"allfunctions": '', // was a
},
init : function()
{
- Log.verbose = this.verbose;
- if (Options.conf) {
-
+ this.LOG.verbose = this.verbose;
+
+
+ if (this.conf) {
+ XObject.extend(this, JSON.parse(File.read(this.conf)));;
}
+ // help ?? -- usage..
+
+ if (!this.files.length) {
+ throw {
+ name: "ArgumentError",
+ message: "No files specified"
+ };
+ }
+ if (!this.template) {
+ throw {
+ name: "ArgumentError",
+ message: "No template specified"
+ };
+ }
+ if (!this.directory) {
+ throw {
+ name: "ArgumentError",
+ message: "No directory specified"
+ };
+ }
+
+
}
}
\ No newline at end of file