Class ClosureBundler
- java.lang.Object
-
- com.google.javascript.jscomp.deps.ClosureBundler
-
public final class ClosureBundler extends java.lang.ObjectA 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 voidappendInput(java.lang.Appendable out, DependencyInfo info, java.lang.String contents)Append the contents of the string to the supplied appendable.voidappendRuntimeTo(java.lang.Appendable out)voidappendTo(java.lang.Appendable out, DependencyInfo info, com.google.common.io.CharSource content)Append the contents of the CharSource to the supplied appendable.voidappendTo(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.voidappendTo(java.lang.Appendable out, DependencyInfo info, java.lang.String content)Append the contents of the string to the supplied appendable.ClosureBundlerdisableJ2clMinifier()ClosureBundlerembedSourcemap()java.lang.StringgetSourceMap(java.lang.String path)Subclasses that need to provide a source map for any transformed input can return it with this method.ClosureBundleruseEval(boolean useEval)ClosureBundlerwithEs6ModuleTranspiler(Transpiler newEs6ModuleTranspiler)ClosureBundlerwithPath(java.lang.String newPath)ClosureBundlerwithSourceUrl(java.lang.String newSourceUrl)ClosureBundlerwithTranspiler(Transpiler newTranspiler)ClosureBundlerwithTranspilers(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.IOExceptionAppend 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.IOExceptionAppend 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.IOExceptionAppend 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.IOExceptionAppend 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.
-
-