Class BldResPath
java.lang.Object
org.nustaq.kontraktor.remoting.http.undertow.builder.BldResPath
Created by ruedi on 09.06.2015.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallDev(boolean dev) turn on/off all inlining + file caching for easy development.cacheAggregates(boolean cacheAggregates) compress(boolean doGZip) String[]handlerInterceptor(Function<io.undertow.server.HttpServerExchange, Boolean> handlerInterceptor) inline(boolean inline) inline js, css and static html snippets ("html imports")booleanbooleanbooleanisInline()booleanisMinify()booleanjsPostProcessors(JSPostProcessor... procs) post processors are invoked on js fragments/files once "minify" is set to true.minify(boolean minify) modify(Function<BldResPath, BldResPath> modificator) productionBuildDir(File productionBuildDir) production mode only, deliver given file for 'index.html' if it exists, else transpile and bundle and create it.resourcePath(String[] resourcePath) stripComments(boolean stripComments) transpile(String ending, TranspilerHook hook) transpilers(Map<String, TranspilerHook> transpilers)
-
Constructor Details
-
BldResPath
-
-
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
-