-
Notifications
You must be signed in to change notification settings - Fork 7
/
.madrun.mjs
26 lines (25 loc) · 1.46 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
import {run} from 'madrun';
export default {
'start': () => 'bin/dword.js package.json',
'start:dev': async () => `NODE_ENV=development ${await run('start')}`,
'lint': () => `putout .`,
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'fix:lint': () => run('lint', '--fix'),
'build-progress': () => 'webpack --progress',
'build:client': () => run('build-progress', '--mode production'),
'build:client:dev': async () => `NODE_ENV=development ${await run('build-progress')} --mode development`,
'build:start': () => run(['build:client', 'start']),
'build:start:dev': () => run(['build:client:dev', 'start:dev']),
'cp:codemirror:modules': () => 'cp -r node_modules/codemirror modules/',
'build-progress:codemirror': () => 'webpack --progress --config ./webpack.config.codemirror.js',
'build:codemirror:dev': async () => `NODE_ENV=development ${await run('build-progress:codemirror')} --mode development`,
'build:codemirror': () => run('build-progress:codemirror', '--mode production'),
'watch:server': async () => await run('watch', await run('start')),
'watch:client': async () => await run('watch', await run('build:client:dev')),
'watch': () => 'nodemon -w server -w client -x',
'build': () => run(['build:client*', 'build:codemirror*', 'cp:codemirror:*']),
'wisdom': () => run('build'),
'rm:dist': () => 'rimraf dist',
'rm:dist-dev': () => 'rimraf dist-dev',
};