-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmoonbeam.js
executable file
·46 lines (43 loc) · 1.19 KB
/
moonbeam.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
const install = require('./commands/install_moonbeam');
const start = require('./commands/start_node');
const stop = require('./commands/stop_node');
const pause = require('./commands/pause_node');
const unpause = require('./commands/unpause_node');
const status = require('./commands/status_node');
module.exports = (config) => {
if (config.help) {
console.log(`Usage: truffle run moonbeam [command]`);
console.log(`Commands: install, start, stop, pause, unpause, status`);
return;
}
if (config._.length < 2) {
console.log(
'No command provided. Run truffle run moonbeam --help to see the full list.'
);
return;
}
switch (config._[1]) {
case 'install':
install();
break;
case 'start':
start();
break;
case 'stop':
stop();
break;
case 'pause':
pause();
break;
case 'unpause':
unpause();
break;
case 'status':
status();
break;
default:
console.log(
'Command not found. Run truffle run moonbeam --help to see the full list.'
);
}
};