monex
Version:
Execute one or multiple scripts, interactively or in daemon mode, and restart them whenever they crash or a watched file changes.
23 lines (18 loc) • 943 B
text/typescript
/* IMPORT */
import {bin} from 'specialist';
import execute from '~/interactive';
/* MAIN */
bin ( 'monex', 'Execute one or multiple scripts, interactively' )
.autoExit ( false )
/* DEFAULT COMMAND */
.option ( '-c, --cluster <number...>', 'Number(s) of processes to spawn for this cluster', { eager: true } )
.option ( '-d, --delay <number>', 'Minimum delay between restarts' )
.option ( '-n, --name <names...>', 'Name(s) used for debugging purposes', { eager: true } )
.option ( '-r, --restart <name>', 'Name of the script to restart when restarting manually' )
.option ( '-w, --watch <paths...>', 'Watch the provided paths recursively', { eager: true } )
.option ( '-i, --ignore <globs...>', 'Ignore the paths matching any of these globs', { eager: true } )
.option ( '-x, --exec <scripts...>', 'Script(s) to execute', { eager: true, required: true } )
.action ( execute )
/* RUN */
.run ();