Skip to content

Instantly share code, notes, and snippets.

@diverted247
Created May 1, 2014 18:15
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save diverted247/d5a5c8677e1c704cf89f to your computer and use it in GitHub Desktop.
Save diverted247/d5a5c8677e1c704cf89f to your computer and use it in GitHub Desktop.
A Gulp + TypeScript + Component Build script
var gulp = require( 'gulp' ),
component = require( 'gulp-component' ),
tsc = require( 'gulp-typescript-compiler' );
gulp.task( 'default' , [ 'ts' ] , function (){
gulp.src( 'component.json' )
.pipe( component( {
standalone: true
} ) )
.pipe( gulp.dest( 'build' ) )
})
gulp.task( 'ts' , function(){
return gulp.src( 'src/**/*.ts' )
.pipe( tsc( {
module: '',
target: 'ES3',
sourcemap: false,
logErrors: true
} ) )
.pipe( gulp.dest( 'src' ) );
});
gulp.task( 'watch' , function (){
gulp.watch( [ 'index.html' , 'component.json' , 'src/**/*.ts' ] , [ 'default' ] )
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment