-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathgulpfile.js
33 lines (26 loc) · 884 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
/* eslint-disable */
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const mocha = require('gulp-mocha');
const qunit = require('./index');
const paths = {
scripts: ['./*.js', '!./gulpfile.js']
};
gulp.task('lint', () => gulp.src(paths.scripts)
.pipe(eslint({fix: true}))
.pipe(eslint.format())
.pipe(eslint.failAfterError()));
gulp.task('test', () => gulp.src('./test/*.js')
.pipe(mocha()));
gulp.task('qunit:pass', () => gulp.src('./test/fixtures/passing.html')
.pipe(qunit()));
gulp.task('qunit:fail', () => gulp.src('./test/fixtures/failing.html')
.pipe(qunit())
.on('error', function (err) {
console.log(err.toString());
this.emit('end');
}));
gulp.task('watch', () => {
gulp.watch(paths.scripts, gulp.parallel('lint', 'test'));
});
gulp.task('default', gulp.parallel('lint', 'test', 'watch'));