gulp-typescript-compiler
v1.0.1
Published
Typescript plugin for gulp
Downloads
195
Readme
gulp-typescript-compiler
Information
Usage
var gulp = require('gulp');
var tsc = require('gulp-typescript-compiler');
gulp.task('default', function () {
return gulp
.src('app/**/*.ts')
.pipe(tsc({
module: '',
target: 'ES3',
sourcemap: false,
logErrors: true
}))
.pipe(gulp.dest('dist'));
});
or just the entry point to your app
var gulp = require('gulp');
var tsc = require('gulp-typescript-compiler');
gulp.task('default', function () {
return gulp
.src('app/main.ts', {read: false})
.pipe(tsc({
resolve: true
}))
.pipe(gulp.dest('dist'));
});
options.resolve
Type: boolean
Default: false
optional
Specify if the file(s) should resolve required files. By setting this to true the plugin will add to the buffered files all the other imported files.
options.module
Type: string
Default: 'commonjs'
optional
Specify module code generation: 'commonjs' or 'amd'.
options.target
Type: string
Default: 'ES5'
optional
Specify ECMAScript target version: 'ES3', or 'ES5'.
options.sourcemap
Type: boolean
Default: true
optional
Generates corresponding .map file.
logErrors
Type: boolean
Default: true
optional
Log any syntactic errors to console.