4 -- in theory this code can be used as a library... but this is the standard command line version...
10 class PackerRun : Application
12 const OptionEntry[] options = {
15 { "target", 0, 0, OptionArg.STRING, ref opt_target, "Target File to write (eg. roojs.js)", null },
16 { "tmpdir", 0, 0, OptionArg.STRING, ref opt_tmpdir, "Temporary Directory to use", null },
17 { "file", 0, 0, OptionArg.STRING, ref opt_files ,"add a file to compile", null },
18 { "files-from", 0, 0, OptionArg.STRING, ref opt_files_from ,"a text file listing files to compile", null },
19 { "output", 0, 0, OptionArg.STRING, ref opt_compile_output, "output binary file path", null },
20 { "debug", 0, 0, OptionArg.NONE, ref opt_debug, "Show debug messages", null },
23 public static string opt_target;
24 public static string opt_tmpdir;
27 public static string[] opt_compile_files;
30 public PackerRun (string[] args)
34 application_id: "org.roojs.jsdoc.packerrun",
35 flags: ApplicationFlags.FLAGS_NONE
39 var opt_context = new OptionContext ("JSDOC Packer");
42 opt_context.set_help_enabled (true);
43 opt_context.add_main_entries (options, null);
44 opt_context.parse (ref args);
47 } catch (OptionError e) {
48 stdout.printf ("error: %s\n", e.message);
49 stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s",
50 args[0], opt_context.get_help(true,null));
51 GLib.Process.exit(Posix.EXIT_FAILURE);
55 // now run the Packer...