@SupportedResourceType(value=JS) public class TypeScriptProcessor extends Object implements ResourcePreProcessor, ResourcePostProcessor, SupportAware
npm install -g typescript
It is possible to test whether the tsc utility is available using isSupported()| Constructor and Description |
|---|
TypeScriptProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected String[] |
getCommandLine(String filePath,
String outFilePath)
Creates the platform specific arguments to run the
tsc shell utility. |
boolean |
isSupported() |
protected void |
onException(Exception e,
String content)
Invoked when a processing exception occurs.
|
void |
process(Reader reader,
Writer writer) |
void |
process(Resource resource,
Reader reader,
Writer writer) |
public static final String ALIAS
public void process(Resource resource, Reader reader, Writer writer) throws IOException
process in interface ResourcePreProcessorIOExceptionprotected void onException(Exception e, String content)
WroRuntimeException.e - the Exception thrown during processingcontent - the resource content being processed.public void process(Reader reader, Writer writer) throws IOException
process in interface ResourcePostProcessorIOExceptionpublic boolean isSupported()
isSupported in interface SupportAwareprotected String[] getCommandLine(String filePath, String outFilePath)
tsc shell utility. Default implementation handles
windows and unix platforms.Copyright © 2008-2013. All Rights Reserved.