-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.madrun.mjs
29 lines (25 loc) · 1.06 KB
/
.madrun.mjs
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
import {run, cutEnv} from './lib/madrun.js';
const noop = () => {};
const NODE_OPTIONS = `'--import mock-import/register --no-warnings'`;
const env = {
SUPERTAPE_PROGRESS_BAR_MIN: 20,
NODE_OPTIONS,
};
export default {
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'test:only': () => `tape 'test/**/*.js' '{lib,bin}/**/*.spec.{js,mjs}'`,
'test': async () => [env, await run('test:only')],
'watch:test': async () => await run('watcher', await cutEnv('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 () => `escover ${await run('test:only')}`,
'coverage:old': async () => [`c8 ${await run('test:only')}`, env],
'report': () => 'c8 report --reporter=lcov',
'postpublish': () => 'npm i -g',
'hello': noop,
'prepare': () => 'echo "> prepare"',
};