-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (36 loc) · 1.04 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use strict';
var gulp = require('gulp');
var connect = require('gulp-connect');
var ts = require('gulp-typescript');
gulp.task('connect', function() {
connect.server();
});
gulp.task('build', function () {
gulp.src('src/**/*.ts')
.pipe(ts({
typescript: require('typescript'),
noImplicitAny: true,
module: 'commonjs',
target: 'ES5',
outDir: 'dist'
}));
});
var tsProject = ts.createProject({
typescript: require('typescript'),
noImplicitAny: true,
module: 'commonjs',
target: 'ES5',
outDir: 'dist'
});
gulp.task('scripts', function() {
gulp.src('src/**/*.ts').pipe(ts(tsProject))
.pipe(gulp.dest('dist'));
// return merge([ // Merge the two output streams, so this task is finished when the IO of both operations are done.
// tsResult.dts.pipe(gulp.dest('release/definitions')),
// tsResult.js.pipe(gulp.dest('release/js'))
// ]);
});
gulp.task('watch', ['scripts'], function() {
gulp.watch('src/**/*.ts', ['scripts']);
});
gulp.task('default', ['watch', 'connect']);