*/
public String process(final String filename, final String code)
throws IOException {
final StopWatch watch = new StopWatch();
watch.start("init " + filename);
final RhinoScriptBuilder builder = initScriptBuilder();
watch.stop();
final String originalCode = WroUtil.toJSMultiLineString(code);
// TODO handle reservedNames
final String optionsAsJson = createOptionsAsJson();
Validate.notNull(optionsAsJson);
final String scriptAsString = String.format(getInvokeScript(), originalCode, optionsAsJson);
watch.start(uglify ? "uglify" : "beautify");
final Object result = builder.evaluate(scriptAsString, "uglifyIt");
watch.stop();
LOG.debug(watch.prettyPrint());
return String.valueOf(result);
}