-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.madrun.js
25 lines (24 loc) · 1.2 KB
/
.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
import {run} from 'madrun';
export default {
'start': () => './bin/loop.sh',
'lint': () => run('lint:*'),
'lint:js': () => 'putout .',
'lint:bash': () => `docker run --rm -v "$PWD:/mnt" koalaman/shellcheck lib/*.sh bin/*.sh`,
'fix:lint': () => run('lint:js', '--fix'),
'docker:build': () => 'docker build . -t coderaiser/loop:`version`',
'postdocker:build': () => 'docker tag coderaiser/loop:`version` coderaiser/loop:latest',
'rm:docker': () => 'docker rmi -f coderaiser/loop:`version`',
'docker:push': () => 'docker push coderaiser/loop:`version`',
'postdocker:push': () => 'docker push coderaiser/loop:latest',
'build:amber': () => 'mkdir -p dist; amber amber/loop.js dist/loop.sh',
'run:amber': () => 'bash dist/loop.sh',
'run': () => run(['build:amber', 'run:amber']),
'build': () => run('docker:build'),
'build:all': () => run('docker:*'),
'wisdom:done': () => run('build:all'),
'wisodm': () => run('lint'),
'prewisdom': async () => await run(['rm:*', 'rm:docker']),
'rm:package-lock': () => 'rm -f package-lock.json',
'watcher': () => 'nodemon -w . -e sh --exec',
'watch:lint': async () => await run('watcher', `'npm run lint'`),
};