Class BldResPath
java.lang.Object
org.nustaq.kontraktor.remoting.http.undertow.builder.BldResPath
public class BldResPath extends Object
Created by ruedi on 09.06.2015.
-
Constructor Summary
Constructors Constructor Description BldResPath(BldFourK cfg4k, String urlPath) -
Method Summary
Modifier and Type Method Description BldResPathallDev(boolean dev)turn on/off all inlining + file caching for easy development.BldResPathbaseDir(String baseDir)BldFourKbuildResourcePath()BldResPathcacheAggregates(boolean cacheAggregates)BldResPathcfg4k(BldFourK cfg4k)BldResPathcompress(boolean doGZip)BldResPathelements(String... resourcePath)StringgetBaseDir()Function<io.undertow.server.HttpServerExchange,Boolean>getHandlerInterceptor()List<JSPostProcessor>getProdModePostProcessors()FilegetProductionBuildDir()String[]getResourcePath()Map<String,TranspilerHook>getTranspilers()StringgetUrlPath()BldResPathhandlerInterceptor(Function<io.undertow.server.HttpServerExchange,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(Function<BldResPath,BldResPath> modificator)BldResPathproductionBuildDir(File productionBuildDir)production mode only, deliver given file for 'index.html' if it exists, else transpile and bundle and create it.BldResPathresourcePath(String[] resourcePath)BldResPathstripComments(boolean stripComments)BldResPathtranspile(String ending, TranspilerHook hook)BldResPathtranspilers(Map<String,TranspilerHook> transpilers)BldResPathurlPath(String urlPath)
-
Constructor Details
-
Method Details
-
handlerInterceptor
public BldResPath handlerInterceptor(Function<io.undertow.server.HttpServerExchange,Boolean> handlerInterceptor) -
getProdModePostProcessors
-
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
-
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
-
isCacheAggregates
public boolean isCacheAggregates() -
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
-
transpilers
-