string code,
string property,
string ptype,
- JsRender.JsRender file,
- JsRender.Node? node,
+ JsRender.JsRender file,
out Gee.HashMap<int,string> errors
)
{
print("validate code (%s) ptype=%s property=%s\n", file.language, ptype, property);
- errors = new Gee.HashMap<int,string>();
+ errors = new Gee.HashMap<int,string>();
if (file.language != "js") {
return false;
if (ptype == "file") {
- this.validateJavascriptCompression(file, state, code);
+ return this.javascriptHasCompressionErrors(file, state, code);
}
print("no errors\n");
- return ret;
+ return false;
}
- public void validateJavascriptCompression(JsRender.JsRender file, WindowState state, string code)
+ public bool javascriptHasCompressionErrors(JsRender.JsRender file, WindowState state, string code)
{
// this uses the roojspacker code to try and compress the code.
// it should highlight errors before we actually push live the code.
p.packFile(code, file.path,"");
state.showCompileResult(p.result);
+ if (p.hasErrors("")) {
+ return true;
+ }
+ return false;