anchor.diff:  	[DoctypeString | AST].
   
   handle_javascript(AST, Attr, SourceFN, {_, DTmp, DJS, _, _, _}) ->
  +	BaseName = filename:basename(SourceFN, ".zml"),
  +
   	JSFileList = get_js_list(Attr, SourceFN),
   	LoadedFiles = load_js_files(JSFileList, DTmp),
  +	Result = optimize_js(LoadedFiles, filename:join([DJS, BaseName ++ ".js"])),
  +	case Result of
  +		[] -> great;
  +		_ -> erlang:error({"Javascript Error", Result})
  +	end,
   	AST.
   
   % Look in the attributes and in the source directory to see which javascript
  
positive.code: -module(zml_special_html).
  
  -export([run_handler/6]).
  
negative.code: 			end
  	end.
  
  optimize_js([], _) ->
  	[];
  optimize_js(Files, Dest) ->
  	Cmd = lists:flatten(["java -jar $ZML_CLOSURE_JAR",
  		lists:map(fun(A) -> [" --js=",A] end, Files),
  		" --js_output_file=", Dest,
  		" --compilation_level=ADVANCED_OPTIMIZATIONS",
  		" --warning_level=QUIET"]),
  	string:strip(os:cmd(Cmd)).
  