gulp-typescript-closure-compiler
A gulp plugin for handling typescript-closure-compiler compilation.
The current version is compatible with typescript-closure-compiler 1.8
.
For the purposes of clarity each npm package that will be released will match the major and minor version of typescript-closure-compiler
.
For example each version of gulp-typescript-closure-compiler
that is compatible with typescript-closure-compiler 1.7
will be constructed also 1.7.x and each version that is compatible with typescript-closure-compiler 1.8
will be constructed as 1.8.x
Installing
For the latest stable version:
npm install gulp-typescript-closure-compiler
or use it in the dependencies/devDependencies section of your package.json
"dependencies": "gulp-typescript-closure-compiler": "1.8.x"
Installing the latest version means that gulp-typescript-closure-compiler
will be dependent upon the latest version of typescript-closure-compiler 1.8
If you work with a specific version of typescript-closure-compiler (for instance 1.7),
Then you need to install it globally using the @{version} after the gulp-typescript-closure-compiler
name:
npm install -g gulp-typescript-closure-compiler@17x
or use it in the dependencies/devDependencies section of your package.json
"dependencies": "gulp-typescript-closure-compiler": "1.7.x"
Basic Usage
Import the library
var tscc = ;
create the gulp-typescript-closure-compiler task
gulp;
Invoke the task
gulp build-source
This example will compile all TypeScript files in folder src
to a single closure compiler ready output file called output.js
in built
folder.
tsconfig.json
Using Import the library
var tscc = ;
To use tsconfig.json
, you have to use tscc.createProject
:
var project = tscc; //a directory containing a tsconfig.json
create the gulp-typescript-closure-compiler task
gulp;
Invoke the task
gulp build-project
Usage Examples
See an example using gulp-typescript-closure-compiler
plugin in the TSFunq project.
License
gulp-typescript-closure-compiler is licensed under the MIT license.