forked from shaunburdick/slack-ooo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
41 lines (34 loc) · 908 Bytes
/
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
var gulp = require('gulp');
var ts = require('gulp-typescript');
var del = require('del');
var watch = require('gulp-watch');
var batch = require('gulp-batch');
var jsdoc = require("gulp-jsdoc");
gulp.task('default', ['build']);
gulp.task('build', ['compile']);
gulp.task('compile', ['clean'], function() {
var tsResult = gulp.src('src/**/*.ts')
.pipe(ts({
// noImplicitAny: true,
noEmitOnError: true,
target: 'ES5',
module: 'commonjs'
}));
return tsResult.js.pipe(gulp.dest('release/js'));
});
gulp.task('doc', function() {
gulp.src(['release/js/**/*.js', 'README.md'])
.pipe(jsdoc.parser())
.pipe(jsdoc.generator('./doc'));
});
gulp.task('clean', function(cb) {
del([
'release/**/*',
'!release/js/config.js'
], cb);
});
gulp.task('watch', function() {
watch('src/**/*', batch(function(ev, done) {
gulp.start('build', done);
}));
});