TypeScript plugin for gulp
First, install gulp-typescript
as a development dependency:
npm install --save-dev gulp-typescript
Then, add it to your gulpfile.js
:
var typescript = require('gulp-typescript');
gulp.src('./src/*.ts', { read: false })
.pipe(typescript({
module: 'commonjs',
target: 'ES5'
}))
.pipe(gulp.dest('./dist'));
Type: Boolean
Default: false
Generates corresponding .d.ts file.
Type: String
Specifies the location where debugger should locate map files instead of generated locations.
Type: String
Specify module code generation: commonjs
or amd
Type: Boolean
Default: false
Warn on expressions and declarations with an implied any
type.
Type: Boolean
Default: false
Skip resolution and preprocessing.
Type: String
Concatenate and emit output to single file.
Type: String
Redirect output structure to the directory.
Type: Boolean
Default: false
Do not emit comments to output.
Type: Boolean
Default: false
Generates corresponding .map file.
Type: String
Specifies the location where debugger should locate TypeScript files instead of source locations.
Type: String
Default: ES3
Specify ECMAScript target version: 'ES3' or 'ES5'
Note: File is specified in option key.
Insert command line options and files from a file.