@ GwtIncompatible ( "Unnecessary" ) JsonFileSpec createJsonFile ( B options , String outputMarker , Function < String , String > escaper ) throws IOException { Appendable jsOutput = new StringBuilder ( ) ; writeOutput ( jsOutput , compiler , ( JSModule ) null , config . outputWrapper , outputMarker , escaper ) ; JsonFileSpec jsonOutput = new JsonFileSpec ( jsOutput . toString ( ) , Strings . isNullOrEmpty ( config . jsOutputFile ) ? "compiled.js" : config . jsOutputFile ) ; if ( ! Strings . isNullOrEmpty ( options . sourceMapOutputPath ) ) { StringBuilder sourcemap = new StringBuilder ( ) ; compiler . getSourceMap ( ) . appendTo ( sourcemap , jsonOutput . getPath ( ) ) ; jsonOutput . setSourceMap ( sourcemap . toString ( ) ) ; } return jsonOutput ; }
Save the compiler output to a JsonFileSpec to be later written to stdout