-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.madrun.mjs
34 lines (33 loc) · 1.73 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
30
31
32
33
34
import {run} from 'madrun';
export default {
'start': () => 'bin/deepword.js package.json',
'start:dev': () => 'NODE_ENV=development npm start',
'test': () => `tape '{client,common,server}/**/*.spec.js'`,
'coverage': () => 'c8 npm test',
'report': () => 'c8 report --reporter=lcov',
'watcher:test': () => 'nodemon -e spec.js -w client -w server -w common -x ',
'fix:lint': () => run('lint', '--fix'),
'lint': () => 'putout .',
'fresh:lint': () => run('lint', '--fresh'),
'lint:fresh': () => run('lint', '--fresh'),
'wisdom': () => run('build'),
'build': () => run([
'clean',
'mkdir',
'build:client*',
'cp:*',
]),
'cp:socket.io:dist': () => 'cp node_modules/socket.io-client/dist/socket.io.js dist/socket.io.js',
'cp:socket.io:dist-dev': () => 'cp node_modules/socket.io-client/dist/socket.io.js dist-dev/socket.io.js',
'cp:socket.io.map:dist': () => 'cp node_modules/socket.io-client/dist/socket.io.js.map dist/socket.io.js.map',
'cp:socket.io.map:dist-dev': () => 'cp node_modules/socket.io-client/dist/socket.io.js.map dist-dev/socket.io.js.map',
'build-progress': () => 'webpack --progress',
'build:client': () => run('build-progress', '--mode production'),
'build:start': () => run(['build:client', 'start']),
'build:client:dev': async () => `NODE_ENV=development ${await run('build-progress')} --mode development`,
'build:start:dev': () => run(['build:client:dev', 'start:dev']),
'watch:client': async () => `nodemon -w client -x "${await run('build:client')}"`,
'watch:client:dev': async () => `NODE_ENV=development "${await run('watch:client')}"`,
'mkdir': () => 'mkdirp dist dist-dev',
'clean': () => 'rimraf dist dist-dev',
};