-
Notifications
You must be signed in to change notification settings - Fork 139
Expand file tree
/
Copy pathgulpfile.js
More file actions
37 lines (30 loc) · 870 Bytes
/
gulpfile.js
File metadata and controls
37 lines (30 loc) · 870 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
27
28
29
30
31
32
33
34
35
36
37
// @ts-nocheck
import { runTests } from '@hypothesis/frontend-build/tests';
import { spawn } from 'node:child_process';
import * as gulp from 'gulp';
function build(cb) {
const make = spawn('make', ['build'], { stdio: 'inherit' });
make.on('close', code => {
if (code !== 0) {
cb(new Error(`make exited with status ${code}`));
} else {
cb(null);
}
});
}
function watchClient() {
gulp.watch('node_modules/hypothesis', { events: 'all' }, build);
}
function watchSrc() {
gulp.watch('src', { events: 'all' }, build);
}
export const watch = gulp.parallel(build, watchClient, watchSrc);
// Unit and integration testing tasks.
gulp.task('test', () =>
runTests({
bootstrapFile: 'tests/bootstrap.js',
vitestConfig: 'vitest.config.js',
rollupConfig: 'rollup-tests.config.js',
testsPattern: 'tests/**/*-test.js',
}),
);