rocketmake-typescript
This node module provides typescript compilation services via a locally installed (peer) typescript node module
It is intended to be used in conjunction with a tsconfig.json
GULP
This module is not tied to any build framework, although it has been written to be easily used with Gulp. Simply nmp install gulp (and your typescript compiler), and include the relevant code from below into your gulp file!
nmp install gulp -gnmp install gulp --save-devnmp install typescript --save-dev
Gulp install NOTE!
You dont need to globally install Gulp - you can invoke gulp via your project.json
"scripts":
Then use the following specifying your (optional) "task:name"
npm run gulp [task:name]
Usage
This module needs to know the 'source' folder (the folder in which the tsconfig.json file exists) The source folder should be the root of all your typescript files and typings
example tsconfig.json (in source folder)
var rmTypescript = ; // Compiles the 'source' folder, outputting to the 'outDir' from tsconfig.jsongulp; // Equivalent to the command above, pass all arguments as elements of an arraygulp; // Equivalent to both commands above, the command is split by " " to build the argumentsgulp; // Compiles the 'source' folder to .d.ts files, overriding 'outDir' from tsconfig.json (with "dts")gulp;
Different typescript node module?
If you need to use ntypescript (rather than the official typescript build), or the typescript module is not located in the node module typescript folder, you can specify the location by:
var rmTypescript = ; var tscLocation = "./node_modules/ntypescript/bin/tsc"; gulp;gulp;gulp;gulp;
NOTE: When this parameter is not specified it uses "./node_modules/typescript/bin/tsc"