@ VisibleForTesting @ GwtIncompatible ( "Unnecessary" ) void printModuleGraphManifestOrBundleTo ( JSModuleGraph graph , Appendable out , boolean isManifest ) throws IOException { Joiner commas = Joiner . on ( "," ) ; boolean requiresNewline = false ; for ( JSModule module : graph . getAllModules ( ) ) { if ( requiresNewline ) { out . append ( "\n" ) ; } if ( isManifest ) { // See CommandLineRunnerTest to see what the format of this // manifest looks like. String dependencies = commas . join ( module . getSortedDependencyNames ( ) ) ; out . append ( String . format ( "{%s%s}\n" , module . getName ( ) , dependencies . isEmpty ( ) ? "" : ":" + dependencies ) ) ; printManifestTo ( module . getInputs ( ) , out ) ; } else { printBundleTo ( module . getInputs ( ) , out ) ; } requiresNewline = true ; } }
Prints a set of modules to the manifest or bundle file .