Typescript compiler task

Typescript compiler task

Description

Task to process tsc, the typescript compiler (see: typescriptlang.org ).

Installation

$ npm install -g typescript

Typescript task parameters

Attribute Description Value Required
file typescript file yes, if no fileset
fileset typescript input files yes, if no file
tofile output javascript file -filename-.js by default no
module associated modules commonjs by default no
target javascript target es5 by default no
outputproperty name of choice to log out the outut of the command none by default no
noEmitOnError true false to prevent the the creation of .js file in case of compile errors false by default

Examples

<project name="tsc task">
	<taskdef name="tsc"
		classname="net.sourceforge.ant4x.taskdefs.javascript.TscTask"
		classpath="PATH/TO/ant4x.jar"/>

	<target name="tsc">
		<tsc file="typescript.ts" tofile="out/typescript.js" noEmitOnError="true" outputproperty="outputproperty"/>
	</target>
</project>