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

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

  • Method Details

    • handlerInterceptor

      public BldResPath handlerInterceptor(Function<io.undertow.server.HttpServerExchange,Boolean> handlerInterceptor)
    • getProdModePostProcessors

      public List<JSPostProcessor> getProdModePostProcessors()
    • getHandlerInterceptor

      public Function<io.undertow.server.HttpServerExchange,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(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(Function<BldResPath,BldResPath> modificator)
    • baseDir

      public BldResPath baseDir(String baseDir)
    • getBaseDir

      public 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 String getUrlPath()
    • isCacheAggregates

      public boolean isCacheAggregates()
    • getResourcePath

      public String[] getResourcePath()
    • isCompress

      public boolean isCompress()
    • transpile

      public BldResPath transpile(String ending, TranspilerHook hook)
    • getTranspilers

      public Map<String,TranspilerHook> getTranspilers()
    • cfg4k

      public BldResPath cfg4k(BldFourK cfg4k)
    • urlPath

      public BldResPath urlPath(String urlPath)
    • resourcePath

      public BldResPath resourcePath(String[] resourcePath)
    • productionBuildDir

      public BldResPath productionBuildDir(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 File getProductionBuildDir()
    • transpilers

      public BldResPath transpilers(Map<String,TranspilerHook> transpilers)