code: @GwtIncompatible("Unnecessary")
    private JsonFileSpec createJsonFileFromModule(JSModule module) throws IOException {
      compiler.resetAndIntitializeSourceMap();
  
      StringBuilder output = new StringBuilder();
      writeModuleOutput(output, module);
  
      JsonFileSpec jsonFile = new JsonFileSpec(output.toString(),
          getModuleOutputFileName(module));
  
      StringBuilder moduleSourceMap = new StringBuilder();
  
      compiler.getSourceMap().appendTo(moduleSourceMap,
          getModuleOutputFileName(module));
  
      jsonFile.setSourceMap(moduleSourceMap.toString());
  
      return jsonFile;
    }
docs: Given an output module, convert it to a JSONFileSpec with associated sourcemap