Interface ScriptProcessor
-
- All Known Subinterfaces:
ScriptTransformer
@ConsumerType public interface ScriptProcessor
ScriptProcessorprocesses a script by minifying, obfuscating etc.
-
-
Field Summary
Fields Modifier and Type Field Description static StringFEATURE_MINIFYName of the minify feature.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetName()Name of this processor.booleanhandles(LibraryType type)Checks if this processor can handle the give library type.booleanprocess(LibraryType type, ScriptResource source, Writer output, Map<String,String> options)Processes the given input using the options.
-
-
-
Field Detail
-
FEATURE_MINIFY
static final String FEATURE_MINIFY
Name of the minify feature.- See Also:
- Constant Field Values
-
-
Method Detail
-
handles
boolean handles(@Nonnull LibraryType type)
Checks if this processor can handle the give library type. handles the file with the given extension- Parameters:
type- the type- Returns:
trueif this processor handles the type
-
process
boolean process(@Nonnull LibraryType type, @Nonnull ScriptResource source, @Nonnull Writer output, @Nonnull Map<String,String> options) throws IOException
Processes the given input using the options.- Parameters:
type- the library type to processsource- input sourceoutput- output writeroptions- processing options.- Returns:
trueif the sources were processed- Throws:
IOException- if an I/O error occurs
-
-