Created
May 1, 2014 18:15
-
-
Save diverted247/d5a5c8677e1c704cf89f to your computer and use it in GitHub Desktop.
A Gulp + TypeScript + Component Build script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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