List<SourceFile> externs = closureConfig.getExterns();
if (closureConfig.getUseDefaultExterns()) {
externs.addAll(CommandLineRunner.getDefaultExterns());
}
Compiler compiler = new Compiler();
compiler.compile(externs, Lists.newArrayList(input), options);
if (compiler.hasErrors()) {
throw new EvaluatorException(compiler.getErrors()[0].description);
}
writer.append(compiler.toSource());
if (closureConfig.getSourceMapFormat() != null) {
log.info("Creating the minified file map ["
+ ((verbose) ? sourceMapResult.getPath() : sourceMapResult.getName()) + "].");
sourceMapResult.createNewFile();
flushSourceMap(sourceMapResult, minifiedFile.getName(), compiler.getSourceMap());
writer.append(System.getProperty("line.separator"));
writer.append("//# sourceMappingURL=" + sourceMapResult.getName());
}