File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,14 @@ func Install(args []string) {
54
54
}
55
55
}
56
56
57
+ func Uninstall (args []string ) {
58
+ if len (args ) != 1 {
59
+ fmt .Println ("flight uninstall <pkg>" )
60
+ } else {
61
+ os .RemoveAll (fmt .Sprintf ("./node_modules/%v" , args [0 ]))
62
+ }
63
+ }
64
+
57
65
func Figlet () {
58
66
// Open the file.
59
67
f , _ := os .Open ("..\\ misc\\ flight.txt" )
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ func main() {
12
12
if len (cli ) == 0 {
13
13
fmt .Println ("flight <command> [arguments]" )
14
14
} else {
15
- if cli [0 ] == "help " {
15
+ if cli [0 ] == "-h " {
16
16
funcs .Help ()
17
- } else if cli [0 ] == "install" {
17
+ } else if cli [0 ] == "install" || cli [ 0 ] == "i" || cli [ 0 ] == "add" || cli [ 0 ] == "a" || cli [ 0 ] == "get" || cli [ 0 ] == "g" {
18
18
funcs .Install (cli [1 :])
19
+ } else if cli [0 ] == "uninstall" || cli [0 ] == "u" || cli [0 ] == "remove" || cli [0 ] == "r" || cli [0 ] == "ui" {
20
+ funcs .Uninstall (cli [1 :])
19
21
} else {
20
22
fmt .Println ("flight <command> [arguments]" )
21
23
}
You can’t perform that action at this time.
0 commit comments