Class RhinoTypeScriptProcessor
java.lang.Object
ro.isdc.wro.extensions.processor.js.RhinoTypeScriptProcessor
- All Implemented Interfaces:
Destroyable,ResourcePostProcessor,ResourcePreProcessor
@SupportedResourceType(JS)
public class RhinoTypeScriptProcessor
extends Object
implements ResourcePreProcessor, ResourcePostProcessor, Destroyable
Compiles TypeScript into javascript in a cross platform manner. Uses rhino to interpret javascript implementation of
the compiler.
- Since:
- 1.6.3
- Author:
- Alex Objelean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()protected TypeScriptCompilerprotected voidonException(Exception e, String content) Invoked when a processing exception occurs.voidvoid
-
Field Details
-
ALIAS
- See Also:
-
-
Constructor Details
-
RhinoTypeScriptProcessor
public RhinoTypeScriptProcessor()
-
-
Method Details
-
process
- Specified by:
processin interfaceResourcePreProcessor- Throws:
IOException
-
onException
Invoked when a processing exception occurs. -
newCompiler
- Returns:
- the
TypeScriptCompilerengine implementation. Override it to provide a different version of the typescript.js library. Useful for upgrading the processor outside the wro4j release.
-
process
- Specified by:
processin interfaceResourcePostProcessor- Throws:
IOException
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
Exception
-