Class ClosureBundler


  • public final class ClosureBundler
    extends java.lang.Object
    A utility class to assist in creating JS bundle files.
    • Constructor Detail

      • ClosureBundler

        public ClosureBundler()
      • ClosureBundler

        public ClosureBundler​(Transpiler transpiler)
    • Method Detail

      • withSourceUrl

        public final ClosureBundler withSourceUrl​(java.lang.String newSourceUrl)
      • withPath

        public final ClosureBundler withPath​(java.lang.String newPath)
      • 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.