From 3b9ace3d98f421a74f2abb226b5f2323dd3559cf Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 20 Apr 2016 13:04:12 +0100 Subject: [PATCH] Copy typings on build refs #35 --- demo-shell-ng2/gulpfile.js | 11 ++++++++++- demo-shell-ng2/tsconfig.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/demo-shell-ng2/gulpfile.js b/demo-shell-ng2/gulpfile.js index b38f046387..ebd3d88397 100644 --- a/demo-shell-ng2/gulpfile.js +++ b/demo-shell-ng2/gulpfile.js @@ -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']); diff --git a/demo-shell-ng2/tsconfig.json b/demo-shell-ng2/tsconfig.json index 242e29b3a5..4f58829dc9 100644 --- a/demo-shell-ng2/tsconfig.json +++ b/demo-shell-ng2/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es6", + "target": "es5", "outDir": "dist/app", "module": "system", "moduleResolution": "node",