-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
35 lines (30 loc) · 688 Bytes
/
cli.js
File metadata and controls
35 lines (30 loc) · 688 Bytes
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
#!/usr/bin/env node
const figlet = require('figlet');
const chalk = require("chalk");
const init = require("./src/init");
const list = require("./src/list");
const add = require("./src/add");
const del = require("./src/del");
console.log(chalk.green(figlet.textSync('Animal !', {
font: 'Standard'
})));
const args = process.argv.slice(2)
if (args.length > 0) {
const [arg] = args
switch (arg) {
case 'init':
init()
break;
case 'list':
list()
break;
case 'add':
add()
break;
case 'del':
del()
break;
default:
break;
}
}