Skip to content

Commit 288edad

Browse files
authored
Update index.js
1 parent 5220fa8 commit 288edad

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

lib/index.js

+24-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@ import fs from 'fs';
44
import minimist from 'minimist';
55

66
const pkg = JSON.parse(fs.readFileSync("./../package.json", 'utf-8'));
7-
const argv = minimist(process.argv.slice(2));
7+
const argv = minimist(process.argv.slice(2), {
8+
alias: {
9+
'development': 'dev',
10+
'stable': 'main'
11+
}
12+
});
813
const command = argv._[0];
14+
(async () => {
15+
switch(command) {
16+
case "help":
17+
console.log(`
18+
modmail.js ${pkg.version} - The modmailbot management tool
919
20+
Commands:
21+
- [modmail create] Create a new modmail bot
22+
- [modmail config] Configure a modmail bot
23+
- [modmail version] Check for updates
24+
- [modmail help] Get help
25+
26+
Arguments:
27+
- [dir] Directory name
28+
- [port] Specify port
29+
`)
30+
break;
31+
}
32+
})();

0 commit comments

Comments
 (0)