Class ClosureBundler
java.lang.Object
com.google.javascript.jscomp.deps.ClosureBundler
A utility class to assist in creating JS bundle files.
-
Constructor Summary
ConstructorsConstructorDescriptionClosureBundler
(Transpiler transpiler) ClosureBundler
(Transpiler transpiler, Transpiler es6ModuleTranspiler) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendInput
(Appendable out, DependencyInfo info, String contents) Append the contents of the string to the supplied appendable.void
void
appendTo
(Appendable out, DependencyInfo info, com.google.common.io.CharSource content) Append the contents of the CharSource to the supplied appendable.void
appendTo
(Appendable out, DependencyInfo info, File content, Charset contentCharset) Append the contents of the file to the supplied appendable.void
appendTo
(Appendable out, DependencyInfo info, String content) Append the contents of the string to the supplied appendable.final ClosureBundler
getSourceMap
(String path) Subclasses that need to provide a source map for any transformed input can return it with this method.final ClosureBundler
useEval
(boolean useEval) withEs6ModuleTranspiler
(Transpiler newEs6ModuleTranspiler) final ClosureBundler
final ClosureBundler
withSourceUrl
(String newSourceUrl) withTranspiler
(Transpiler newTranspiler) withTranspilers
(Transpiler newTranspiler, Transpiler newEs6ModuleTranspiler)
-
Constructor Details
-
ClosureBundler
public ClosureBundler() -
ClosureBundler
-
ClosureBundler
-
-
Method Details
-
withTranspilers
-
withTranspiler
-
withEs6ModuleTranspiler
-
disableJ2clMinifier
-
useEval
-
withSourceUrl
-
withPath
-
embedSourcemap
-
appendInput
public static void appendInput(Appendable out, DependencyInfo info, String contents) throws IOException Append the contents of the string to the supplied appendable.- Throws:
IOException
-
appendTo
Append the contents of the string to the supplied appendable.- Throws:
IOException
-
appendTo
public void appendTo(Appendable out, DependencyInfo info, File content, Charset contentCharset) throws IOException Append the contents of the file to the supplied appendable.- Throws:
IOException
-
appendTo
public void appendTo(Appendable out, DependencyInfo info, com.google.common.io.CharSource content) throws IOException Append the contents of the CharSource to the supplied appendable.- Throws:
IOException
-
appendRuntimeTo
- Throws:
IOException
-
getSourceMap
Subclasses that need to provide a source map for any transformed input can return it with this method.
-