public.javadoc.org.spincast.plugins.jsclosurecompiler.SpincastJsClosureCompilerPebbleExtensionDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastJsClosureCompilerPebbleExtensionDefault (org.spincast:spincast-framework 1.14.0 API)
org.spincast.plugins.jsclosurecompiler
Class SpincastJsClosureCompilerPebbleExtensionDefault
- java.lang.Object
-
- com.mitchellbosecke.pebble.extension.AbstractExtension
-
- org.spincast.plugins.jsclosurecompiler.SpincastJsClosureCompilerPebbleExtensionDefault
-
- All Implemented Interfaces:
- com.mitchellbosecke.pebble.extension.Extension, SpincastJsClosureCompilerPebbleExtension
public class SpincastJsClosureCompilerPebbleExtensionDefault
extends com.mitchellbosecke.pebble.extension.AbstractExtension
implements SpincastJsClosureCompilerPebbleExtension
Pebble extension
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected static String
HASH_LINE_END
protected static String
HASH_LINE_START
static String
JS_BUNDLE_FUNCTION_ARG_DISABLE_CACHE_BUSTING
protected static org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastJsClosureCompilerPebbleExtensionDefault(SpincastJsClosureCompilerConfig spincastJsClosureCompilerConfig,
SpincastConfig spincastConfig,
SpincastUtils spincastUtils,
Router<?,?> router,
Server server,
HttpClient httpClient,
SpincastJsClosureCompilerManager spincastJsClosureCompilerManager)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
protected boolean
bundleJs(File bundleFile,
List<String> jsFilesUrlRelativePaths,
String urlPath,
List<String> cmdArgs)
protected Object
bundlingDisabledOutput(List<String> jsFilesUrlRelativePaths)
protected Object
bundlingOutput(String path)
protected String
generateJsBundleName(List<String> jsFilesUrlRelativePaths)
protected String
generateJsBundleUrlPath(String hash,
boolean withCacheBuster)
protected String
getExistingBundleFileHash(File bundleFile)
Return the hash used to create the existing
bundle oir null
if the bundle doesn't
exist.
Map<String,com.mitchellbosecke.pebble.extension.Function>
getFunctions()
protected HttpClient
getHttpClient()
protected File
getJsBundleFile(String hash)
protected Router<?,?>
getRouter()
protected Server
getServer()
protected SpincastConfig
getSpincastConfig()
protected SpincastJsClosureCompilerConfig
getSpincastJsClosureCompilerConfig()
protected SpincastJsClosureCompilerManager
getSpincastJsClosureCompilerManager()
protected SpincastUtils
getSpincastUtils()
-
Methods inherited from class com.mitchellbosecke.pebble.extension.AbstractExtension
getBinaryOperators, getFilters, getGlobalVariables, getNodeVisitors, getTests, getTokenParsers, getUnaryOperators
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
JS_BUNDLE_FUNCTION_ARG_DISABLE_CACHE_BUSTING
public static final String JS_BUNDLE_FUNCTION_ARG_DISABLE_CACHE_BUSTING
- See Also:
- Constant Field Values
-
HASH_LINE_START
protected static final String HASH_LINE_START
- See Also:
- Constant Field Values
-
HASH_LINE_END
protected static final String HASH_LINE_END
- See Also:
- Constant Field Values
-
Constructor Detail
-
SpincastJsClosureCompilerPebbleExtensionDefault
@Inject
public SpincastJsClosureCompilerPebbleExtensionDefault(SpincastJsClosureCompilerConfig spincastJsClosureCompilerConfig,
SpincastConfig spincastConfig,
SpincastUtils spincastUtils,
Router<?,?> router,
Server server,
HttpClient httpClient,
SpincastJsClosureCompilerManager spincastJsClosureCompilerManager)
-
Method Detail
-
getSpincastJsClosureCompilerConfig
protected SpincastJsClosureCompilerConfig getSpincastJsClosureCompilerConfig()
-
getSpincastConfig
protected SpincastConfig getSpincastConfig()
-
getSpincastUtils
protected SpincastUtils getSpincastUtils()
-
getRouter
protected Router<?,?> getRouter()
-
getServer
protected Server getServer()
-
getHttpClient
protected HttpClient getHttpClient()
-
getSpincastJsClosureCompilerManager
protected SpincastJsClosureCompilerManager getSpincastJsClosureCompilerManager()
-
getFunctions
public Map<String,com.mitchellbosecke.pebble.extension.Function> getFunctions()
- Specified by:
getFunctions
in interface com.mitchellbosecke.pebble.extension.Extension
- Overrides:
getFunctions
in class com.mitchellbosecke.pebble.extension.AbstractExtension
-
bundlingDisabledOutput
protected Object bundlingDisabledOutput(List<String> jsFilesUrlRelativePaths)
-
bundleJs
protected boolean bundleJs(File bundleFile,
List<String> jsFilesUrlRelativePaths,
String urlPath,
List<String> cmdArgs)
-
getExistingBundleFileHash
protected String getExistingBundleFileHash(File bundleFile)
Return the hash used to create the existing
bundle oir null
if the bundle doesn't
exist.
Copyright © 2019. All rights reserved.