-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (26 loc) · 1.09 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
let gulp = require('gulp'),
babel = require('gulp-babel'),
mocha = require('gulp-mocha'),
del = require('del')
gulp.task('clean:dist', (cb) => { del(['dist'], cb) })
gulp.task('clean:tests', (cb) => { del(['tests_compiled'], cb) })
gulp.task('clean', ['clean:dist', 'clean:tests'])
gulp.task('build:dist', ['clean'], () =>
gulp.src('src/**/*.js')
.pipe(babel({blacklist: ["spec.functionName"]}))
.pipe(gulp.dest('dist')))
gulp.task('build:tests', ['clean'], () =>
gulp.src('tests/*.js')
.pipe(babel({blacklist: ["spec.functionName"]}))
.pipe(gulp.dest('tests_compiled')))
gulp.task('build:perf', ['clean'], () =>
gulp.src('perf/*.js')
.pipe(babel({blacklist: ["spec.functionName"]}))
.pipe(gulp.dest('perf_compiled')))
gulp.task('build', ['build:dist', 'build:tests', 'build:perf'])
// gulp.task('test', () =>
// gulp.src('tests/**/*.js', {read: false})
// .pipe(mocha()))
// gulp.task('watch', () =>
// gulp.watch(['src/**/*.js', 'tests/**/*.js'], ['build', 'test']))
gulp.task('default', ['clean', 'build'])