-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy path.madrun.js
More file actions
37 lines (34 loc) · 1.46 KB
/
.madrun.js
File metadata and controls
37 lines (34 loc) · 1.46 KB
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
import {run, cutEnv} from 'madrun';
import {defineEnv} from 'supertape/env';
const env = defineEnv({
css: true,
timeout: 15_000,
});
export default {
'start': () => 'node bin/gritty',
'start:dev': () => 'NODE_ENV=development npm start',
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'watch:test': () => run('watcher', 'npm test'),
'watcher': () => 'nodemon -w test -w client -w server --exec',
'build-progress': () => 'webpack --progress',
'6to5:client': () => run('build-progress', '--mode production'),
'6to5:client:dev': async () => `NODE_ENV=development ${await run('build-progress', '--mode development')}`,
'watch:client': () => run('6to5:client', '--watch'),
'watch:client:dev': () => run('6to5:client:dev', '--watch'),
'wisdom': () => run('build'),
'build': () => run('6to5:*'),
'build:start': () => run(['build:client', 'start']),
'build:start:dev': () => run([
'build:client:dev',
'start:dev',
]),
'build:client': () => run('6to5:client'),
'build:client:dev': () => run('6to5:client:dev'),
'watch:lint': async () => `nodemon -w client -w server -w webpack.config.js -x ${await run('lint')}`,
'report': () => 'c8 report --reporter=lcov',
'coverage': async () => [env, `c8 ${await cutEnv('test')}`],
'test': () => [env, `tape 'test/**/*.js'`],
};