java.lang.Object
org.nustaq.kontraktor.remoting.http.undertow.builder.BldResPath

public class BldResPath
extends java.lang.Object
Created by ruedi on 09.06.2015.
  • Constructor Details

  • Method Details

    • handlerInterceptor

      public BldResPath handlerInterceptor​(java.util.function.Function<io.undertow.server.HttpServerExchange,​java.lang.Boolean> handlerInterceptor)
    • getProdModePostProcessors

      public java.util.List<JSPostProcessor> getProdModePostProcessors()
    • getHandlerInterceptor

      public java.util.function.Function<io.undertow.server.HttpServerExchange,​java.lang.Boolean> getHandlerInterceptor()
    • jsPostProcessors

      public BldResPath jsPostProcessors​(JSPostProcessor... procs)
      post processors are invoked on js fragments/files once "minify" is set to true. by default JSMinification postprocessor is set. Calling this resets post processor array. (see JSMinificationPostProcessor, ClojureJSPostProcessor)
      Parameters:
      procs -
      Returns:
    • elements

      public BldResPath elements​(java.lang.String... resourcePath)
      Parameters:
      resourcePath - - a list of directories to lookup when searching for imports/resources
      Returns:
    • inline

      public BldResPath inline​(boolean inline)
      inline js, css and static html snippets ("html imports")
      Parameters:
      inline -
      Returns:
    • stripComments

      public BldResPath stripComments​(boolean stripComments)
    • modify

      public BldResPath modify​(java.util.function.Function<BldResPath,​BldResPath> modificator)
    • baseDir

      public BldResPath baseDir​(java.lang.String baseDir)
    • getBaseDir

      public java.lang.String getBaseDir()
    • minify

      public BldResPath minify​(boolean minify)
    • isInline

      public boolean isInline()
    • isStripComments

      public boolean isStripComments()
    • isMinify

      public boolean isMinify()
    • cacheAggregates

      public BldResPath cacheAggregates​(boolean cacheAggregates)
    • allDev

      public BldResPath allDev​(boolean dev)
      turn on/off all inlining + file caching for easy development. Note for full dev mode a html import enabled browser is required (e.g. chrome) note this overwrites previous settings made to this
    • compress

      public BldResPath compress​(boolean doGZip)
    • buildResourcePath

      public BldFourK buildResourcePath()
    • getUrlPath

      public java.lang.String getUrlPath()
    • isCacheAggregates

      public boolean isCacheAggregates()
    • getResourcePath

      public java.lang.String[] getResourcePath()
    • isCompress

      public boolean isCompress()
    • transpile

      public BldResPath transpile​(java.lang.String ending, TranspilerHook hook)
    • getTranspilers

      public java.util.Map<java.lang.String,​TranspilerHook> getTranspilers()
    • cfg4k

      public BldResPath cfg4k​(BldFourK cfg4k)
    • urlPath

      public BldResPath urlPath​(java.lang.String urlPath)
    • resourcePath

      public BldResPath resourcePath​(java.lang.String[] resourcePath)
    • productionBuildDir

      public BldResPath productionBuildDir​(java.io.File productionBuildDir)
      production mode only, deliver given file for 'index.html' if it exists, else transpile and bundle and create it. Can be used to avoid accidental rebundle in production setups (=static build). In order to force a refresh (e.g. in a build script), delete the file, start server and do a http GET to index.html. If this is not set, the first request after application start triggers bundling+transpilation, the resulting file is cached in memory then (so need server restart in case of source changes if in prod mode).
      Parameters:
      productionBuildDir -
      Returns:
    • getProductionBuildDir

      public java.io.File getProductionBuildDir()
    • transpilers

      public BldResPath transpilers​(java.util.Map<java.lang.String,​TranspilerHook> transpilers)