Copy typings on build

refs #35
This commit is contained in:
Denys Vuika 2016-04-20 13:04:12 +01:00
parent 735bd23c19
commit 3b9ace3d98
2 changed files with 11 additions and 2 deletions

View File

@ -17,6 +17,7 @@ gulp.task('clean', function () {
gulp.task('copy:assets', ['clean'], function() {
return gulp.src(['app/**/*',
'index.html',
'typings.json',
'!app/**/*.ts'], { base : './' })
.pipe(gulp.dest('dist'))
});
@ -29,6 +30,14 @@ gulp.task('copy:libs', ['clean'], function() {
.pipe(gulp.dest('dist/node_modules'))
});
// copy typings
gulp.task('copy:typings', ['clean'], function() {
return gulp.src([
'typings/**/*'
])
.pipe(gulp.dest('dist/typings'))
});
// linting
gulp.task('tslint', function() {
return gulp.src('app/**/*.ts')
@ -66,6 +75,6 @@ gulp.task('serve', ['build'], function() {
gulp.watch(['app/**/*', 'index.html'], ['buildAndReload']);
});
gulp.task('build', ['tslint', 'compile', 'copy:assets', 'copy:libs', ]);
gulp.task('build', ['tslint', 'copy:assets', 'copy:libs', 'copy:typings', 'compile']);
gulp.task('dev', ['build', 'serve'], reload);
gulp.task('default', ['build']);

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6",
"target": "es5",
"outDir": "dist/app",
"module": "system",
"moduleResolution": "node",