forked from Olical/binary-search
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
25 lines (20 loc) · 669 Bytes
/
gulpfile.js
File metadata and controls
25 lines (20 loc) · 669 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
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var benchmark = require('gulp-bench');
gulp.task('benchmark', function () {
return gulp.src('benchmark/binarySearch.js', { read: false })
.pipe(benchmark());
});
gulp.task('test', function () {
return gulp.src('test/binarySearch.js', { read: false })
.pipe(mocha())
.on('error', keepCalmAndCarryOn);
function keepCalmAndCarryOn(err) {
console.error(err);
this.emit('end');
}
});
gulp.task('test-watch', ['test'], function () {
return gulp.watch(['src/binarySearch.js', 'test/binarySearch.js'], ['test']);
});
gulp.task('default', ['test']);