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