-
Notifications
You must be signed in to change notification settings - Fork 0
/
.madrun.js
29 lines (26 loc) · 957 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
26
27
28
29
import {run} from 'madrun';
const env = {
MINIFY: 1,
};
export default {
'test': () => `tape 'test/*.js'`,
'watch:test': async () => `nodemon -w lib -w test -x ${await run('test')}`,
'lint': () => `putout .`,
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'coverage': async () => `c8 ${await run('test')}`,
'report': () => 'c8 report --reporter=lcov',
'wisdom': () => run('build:*'),
'build': () => run('build:*'),
'build:putout': () => 'rollup -c',
'build:putout:esm': async () => [env, await run('build:putout', build({
name: 'putout',
format: 'es',
input: 'lib/putout.js',
output: 'bundle/putout.min.js',
}))],
};
function build({name, format, input, output, exports = 'auto'}) {
return `--name ${name} --format ${format} --input ${input} --o ${output} --exports ${exports}`;
}