-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (24 loc) · 732 Bytes
/
gulpfile.js
File metadata and controls
30 lines (24 loc) · 732 Bytes
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
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var ts = require('gulp-typescript');
var tsProject = ts.createProject('tsconfig.json');
var del = require('del');
gulp.task('default', ['compile']);
gulp.task('clean', function () {
return del('release');
});
gulp.task('compile', ['clean'], function () {
return tsProject.src()
.pipe(ts(tsProject))
.pipe(gulp.dest('release'));
});
gulp.task('watch', function () {
gulp.watch('app/**/*.ts', ['compile']);
});
gulp.task('watch-test', function () {
gulp.watch(['app/**/*.ts', 'test/**/*.js'], ['test']);
});
gulp.task('test', ['compile'], function () {
return gulp.src('test/**/*.test.js', {read: false})
.pipe(mocha({reporter: 'dot'}));
});