-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
26 lines (17 loc) · 727 Bytes
/
gulpfile.js
File metadata and controls
26 lines (17 loc) · 727 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
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', ['build:dist', 'build:tests'])
gulp.task('default', ['clean', 'build'])