-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.madrun.js
25 lines (22 loc) · 960 Bytes
/
.madrun.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
import {run} from 'madrun';
const NODE_OPTIONS = `'--loader escover --no-warnings'`;
const env = {
ESCOVER_FORMAT: 'files',
NODE_OPTIONS,
};
export default {
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'test': () => `tape 'test/**/*.js' '{lib,bin}/**/*.spec.{js,mjs}'`,
'test:mock': async () => [env, await run('test:only')],
'watch:test': async () => await run('watcher', await run('test')),
'watch:tape': () => 'nodemon -w test -w lib --exec tape',
'watch:lint': async () => await run('watcher', await run('lint')),
'watcher': () => 'nodemon -w test -w lib -w bin --exec',
'coverage': async () => `c8 ${await run('test')}`,
'coverage:es': async () => [env, `escover ${await run('test')}`],
'report': () => 'c8 report --reporter=lcov',
'wisdom': () => run(['lint', 'coverage']),
};