Skip to content

Instantly share code, notes, and snippets.

@diverted247
Created October 16, 2014 17:27
Show Gist options
  • Save diverted247/fec4e8748d815a9ec76a to your computer and use it in GitHub Desktop.
Save diverted247/fec4e8748d815a9ec76a to your computer and use it in GitHub Desktop.
'use strict';
var env = process.env.NODE_ENV || 'development';
var gulp = require( 'gulp' );
var path = require( 'path' );
var $ = require( 'gulp-load-plugins' )();
gulp.task( 'tsc' , function (){
return gulp.src( [ './app/src/build.ts' ] )
.pipe( $.tsc( {
target: 'ES5',
out: 'out.js',
outDir: '.tmp/src',
emitError: true,
declaration: true,
removeComments: env === 'production'
}))
.pipe( gulp.dest( '.tmp/src' ) )
.pipe( $.size( { title:'TypeScript size -> ' } ) )
.on( 'error' , $.util.log );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment