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 "directory" : '', // 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 "private": '', // was p
18 "allfunctions": '', // was a
19 "encoding": '', // was e.
20 "nocode": '', // was n
22 "suppress": '', // was s
23 "testmode": '', // was t
25 "verbose": '', // was v
26 "disablecache": '', // was C
27 "define" : [], // was D.
28 "handler" : [], // was H -- not supported..
30 warn : function(str) {
31 print("Warn: " +str );
33 inform : function(str) {
34 print("Inform: " +str );
36 close : function() { },
37 flush : function() { },
44 this.LOG.verbose = this.verbose;
48 XObject.extend(this, JSON.parse(File.read(this.conf)));;
52 if (!this.src.length) {
54 name: "ArgumentError",
55 message: "No source directories specified"
60 name: "ArgumentError",
61 message: "No template specified"
65 if (!this.directory) {
67 name: "ArgumentError",
68 message: "No directory specified"
71 // should cacheDirectory be a subdirectory of target??
73 if (!this.cacheDirectory) {
75 name: "ArgumentError",
76 message: "No cacheDirectory specified"