Class BldResPath
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 Summary
Constructors Constructor Description BldResPath(BldFourK cfg4k, java.lang.String urlPath) -
Method Summary
Modifier and Type Method Description BldResPathallDev(boolean dev)turn on/off all inlining + file caching for easy development.BldResPathbaseDir(java.lang.String baseDir)BldFourKbuildResourcePath()BldResPathcacheAggregates(boolean cacheAggregates)BldResPathcfg4k(BldFourK cfg4k)BldResPathcompress(boolean doGZip)BldResPathelements(java.lang.String... resourcePath)java.lang.StringgetBaseDir()java.util.function.Function<io.undertow.server.HttpServerExchange,java.lang.Boolean>getHandlerInterceptor()java.util.List<JSPostProcessor>getProdModePostProcessors()java.io.FilegetProductionBuildDir()java.lang.String[]getResourcePath()java.util.Map<java.lang.String,TranspilerHook>getTranspilers()java.lang.StringgetUrlPath()BldResPathhandlerInterceptor(java.util.function.Function<io.undertow.server.HttpServerExchange,java.lang.Boolean> handlerInterceptor)BldResPathinline(boolean inline)inline js, css and static html snippets ("html imports")booleanisCacheAggregates()booleanisCompress()booleanisInline()booleanisMinify()booleanisStripComments()BldResPathjsPostProcessors(JSPostProcessor... procs)post processors are invoked on js fragments/files once "minify" is set to true.BldResPathminify(boolean minify)BldResPathmodify(java.util.function.Function<BldResPath,BldResPath> modificator)BldResPathproductionBuildDir(java.io.File productionBuildDir)production mode only, deliver given file for 'index.html' if it exists, else transpile and bundle and create it.BldResPathresourcePath(java.lang.String[] resourcePath)BldResPathstripComments(boolean stripComments)BldResPathtranspile(java.lang.String ending, TranspilerHook hook)BldResPathtranspilers(java.util.Map<java.lang.String,TranspilerHook> transpilers)BldResPathurlPath(java.lang.String urlPath)
-
Constructor Details
-
Method Details
-
handlerInterceptor
public BldResPath handlerInterceptor(java.util.function.Function<io.undertow.server.HttpServerExchange,java.lang.Boolean> handlerInterceptor) -
getProdModePostProcessors
-
getHandlerInterceptor
public java.util.function.Function<io.undertow.server.HttpServerExchange,java.lang.Boolean> getHandlerInterceptor() -
jsPostProcessors
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
- Parameters:
resourcePath- - a list of directories to lookup when searching for imports/resources- Returns:
-
inline
inline js, css and static html snippets ("html imports")- Parameters:
inline-- Returns:
-
stripComments
-
modify
-
baseDir
-
getBaseDir
public java.lang.String getBaseDir() -
minify
-
isInline
public boolean isInline() -
isStripComments
public boolean isStripComments() -
isMinify
public boolean isMinify() -
cacheAggregates
-
allDev
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
-
buildResourcePath
-
getUrlPath
public java.lang.String getUrlPath() -
isCacheAggregates
public boolean isCacheAggregates() -
getResourcePath
public java.lang.String[] getResourcePath() -
isCompress
public boolean isCompress() -
transpile
-
getTranspilers
-
cfg4k
-
urlPath
-
resourcePath
-
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
-