public class UglifyJsProcessor extends RhinoBasedProcessor
| Modifier and Type | Field and Description |
|---|---|
private ClasspathResource |
defaultOptionsResource |
private ClasspathResource |
invokeResource |
private java.lang.String |
reservedNames |
private boolean |
uglify |
commonsScript, cycleScript, envScript, LOG, resourceFactory| Constructor and Description |
|---|
UglifyJsProcessor(boolean uglify,
ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
createOptionsAsJson() |
private java.lang.String |
getReservedNames() |
protected void |
initScope(org.mozilla.javascript.Context context,
org.mozilla.javascript.ScriptableObject globalScope) |
protected java.lang.String |
process(org.mozilla.javascript.Context context,
org.mozilla.javascript.Scriptable scope,
Resource resource,
java.lang.String content) |
void |
setReservedNames(java.lang.String reservedNames)
some libraries rely on certain names to be used, so this option allow you to exclude such names from the mangler.
|
addClientSideEnvironment, addCommon, addJSON, buildSimpleRunScript, callModuleFunction, evaluate, evaluate, evaluate, evaluateFromClasspath, evaluateFromWebjar, process, setupModule, toJSMultiLineStringdestroyprivate boolean uglify
private java.lang.String reservedNames
private ClasspathResource invokeResource
private ClasspathResource defaultOptionsResource
public UglifyJsProcessor(boolean uglify,
ResourceFactory resourceFactory)
public void setReservedNames(java.lang.String reservedNames)
reservedNames - the reservedNames to setprotected void initScope(org.mozilla.javascript.Context context,
org.mozilla.javascript.ScriptableObject globalScope)
throws java.io.IOException
initScope in class RhinoBasedProcessorjava.io.IOExceptionprotected java.lang.String process(org.mozilla.javascript.Context context,
org.mozilla.javascript.Scriptable scope,
Resource resource,
java.lang.String content)
throws java.lang.Exception
process in class RhinoBasedProcessorjava.lang.Exceptionprivate java.lang.String getReservedNames()
protected java.lang.String createOptionsAsJson()
throws java.io.IOException
java.io.IOException