src/jsdoc/PackerRun.vala
[roojspacker] / src / jsdoc / PackerRun.vala
index e1c5c8f..33e01fd 100644 (file)
@@ -76,6 +76,10 @@ namespace JSDOC
                
                public static bool opt_clean_cache = true;      
                
+               // not actually an option yet..
+               
+               public static string opt_doc_ext = "html";
+               
                const OptionEntry[] options = {
                
                        { "jsfile", 'f', 0, OptionArg.FILENAME_ARRAY, ref opt_files ,"add a file to compile", null },
@@ -110,37 +114,7 @@ namespace JSDOC
                        
                        { null }
                };
-               public static int main(string[] args) 
-               {
-                       //foreach(var a in args) {
-                       //      debug("ARG: %s\n", a);
-                       //}
-                       
-                       var opt_context = new OptionContext ("JSDOC Packer");
-                       
-                               try {
-                                       opt_context.set_help_enabled (true);
-                                       opt_context.add_main_entries (options, null);
-                                       if (!opt_context.parse ( ref args)) {
-                                               print("options parse error");
-                                               GLib.Process.exit(Posix.EXIT_FAILURE);
-                                       }
-
-                               
-                                        
-                               
-                               } catch (OptionError e) {
-                                       stdout.printf ("error: %s\n", e.message);
-                                       stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s", 
-                                                                args[0], opt_context.get_help(true,null));
-                                       GLib.Process.exit(Posix.EXIT_FAILURE);
-                                        
-                               }
-               
-                       new PackerRun(args);
-                       return 0;
-               }
-
+                
 
        
                public PackerRun (string[] args)
@@ -152,7 +126,9 @@ namespace JSDOC
                        );
 #endif                                  
                         
-                       
+               }
+               public run()
+               {       
                        // what's required...
                        if (opt_debug) {
                                GLib.Log.set_handler(null,