-
Notifications
You must be signed in to change notification settings - Fork 1
/
sqcr-cli.js
executable file
·59 lines (55 loc) · 1.29 KB
/
sqcr-cli.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env node
'use strict';
const meow = require('meow');
const sqcr = require('.');
const cli = meow(
`
Usage:
$ scqr <buffers-path>
Options:
--buffers, -bf specify location of buffer.js files
--port, -p specify port number
--bpm, -b initial BPM
--path, -d specify root path of server
--init, -i init file name
--clock, -sc use server clock
--config, -c config file path
`,
{
flags: {
port: {
type: 'number',
alias: 'p',
},
bpm: {
type: 'number',
alias: 'b',
},
path: {
type: 'string',
alias: 'd',
},
buffers: {
type: 'string',
alias: 'bf',
},
init: {
type: 'string',
alias: 'i',
},
clock: {
type: 'boolean',
alias: 'sc',
},
config: {
type: 'string',
alias: 'c',
},
},
},
);
if (cli.flags.help || cli.flags.h || !cli.input[0]) {
cli.showHelp();
} else {
sqcr(cli.input, cli.flags);
}