X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FMain.vala;h=df5d6f47bec49067dc0716459cf0485fdf26586a;hb=a8b66892c7c6bf95db7c231045b08bcd36733fa2;hp=d097808d57caf0ef0fc628ff27e9a5039781f265;hpb=69cd1cfd5e2947dff8a7bf10ac0613cd60240dad;p=app.Builder.js diff --git a/src/Main.vala b/src/Main.vala index d097808d5..df5d6f47b 100644 --- a/src/Main.vala +++ b/src/Main.vala @@ -9,7 +9,7 @@ int main (string[] args) { - + new JsRender.Lang_Class(); var app = BuilderApplication.singleton( args); @@ -21,13 +21,7 @@ int main (string[] args) { }); } - if (BuilderApplication.opt_bjs_compile != null) { - - //BuilderApplication.compileBjs(); - print("compile BJS comming soon"); - - GLib.Process.exit(Posix.EXIT_SUCCESS); - } + if (BuilderApplication.opt_list_projects) { //BuilderApplication.compileBjs(); @@ -53,6 +47,8 @@ int main (string[] args) { if (cur_project == null) { GLib.error("invalid project %s, use --list-projects to show project ids",BuilderApplication.opt_compile_project); } + cur_project.scanDirs(); + } @@ -60,15 +56,42 @@ int main (string[] args) { if (cur_project == null) { GLib.error("missing project, use --project to select which project"); } - print("Files\n %s\n", cur_project.listAllFilesToString()); + print("Files for %s\n %s\n", cur_project.name, cur_project.listAllFilesToString()); GLib.Process.exit(Posix.EXIT_SUCCESS); } if (BuilderApplication.opt_bjs_compile != null) { - - + if (cur_project == null) { + GLib.error("missing project, use --project to select which project"); + } + var file = cur_project.getByName(BuilderApplication.opt_bjs_compile); + if (file == null) { + GLib.error("missing file %s in project %s", BuilderApplication.opt_bjs_compile, cur_project.name); + } //BuilderApplication.compileBjs(); - print("compile BJS comming soon"); + file.loadItems(); + var str = file.toSourceCode(); + + + if (!BuilderApplication.opt_debug) { + print("%s", str); + GLib.Process.exit(Posix.EXIT_SUCCESS); + } + + // dump the node tree + file.tree.dumpProps(); + + + var str_ar = str.split("\n"); + for(var i =0;i