gulp-typescript-compiler

1.0.1 • Public • Published

gulp-typescript-compiler

Information

Packagegulp-typescript-compiler
Description Typescript plugin for gulp.
Based of gulp-typescript and typestring
Node Version >= 0.10

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.

Package Sidebar

Install

npm i gulp-typescript-compiler

Weekly Downloads

20

Version

1.0.1

License

MIT

Last publish

Collaborators

  • guzart