1 //<script type="text/javascript">
3 * Options management...
5 XObject = import.XObject.XObject;
6 File = import.File.File;
10 "src" : [], // array of source directories..
11 "target" : '', // was d. ?? source directory (needed to put temporary files..)
12 "cacheDirectory" : '',
13 "conf" : '', // was c.
14 "template": '', // was t.
15 // "recurse": false, // was r. - not supported..
17 "publishExt" : 'html',
18 "private": '', // was p
19 "allfunctions": '', // was a
20 "encoding": '', // was e.
21 "nocode": '', // was n
23 "suppress": '', // was s
24 "testmode": '', // was t
26 "verbose": '', // was v
27 "disablecache": '', // was C
28 "define" : [], // was D.
29 "handler" : [], // was H -- not supported..
31 warn : function(str) {
32 print("Warn: " +str );
34 inform : function(str) {
35 print("Inform: " +str );
37 close : function() { },
38 flush : function() { },
45 this.LOG.verbose = this.verbose;
49 XObject.extend(this, JSON.parse(File.read(this.conf)));;
53 if (!this.src.length) {
55 name: "ArgumentError",
56 message: "No source directories specified"
61 name: "ArgumentError",
62 message: "No template specified"
68 name: "ArgumentError",
69 message: "No directory specified"
72 // should cacheDirectory be a subdirectory of target??
74 if (!this.cacheDirectory) {
76 name: "ArgumentError",
77 message: "No cacheDirectory specified"