File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change
1
+ package cli
2
+
3
+ const Version = "v136"
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ Commands:
20
20
dev Serve the web application in development mode with live reload
21
21
22
22
Options:
23
- --help Display this help message
23
+ --version, -v Show the version of esm.sh CLI
24
+ --help, -h Display this help message
24
25
`
25
26
26
27
func main () {
@@ -41,7 +42,19 @@ func main() {
41
42
cli .Serve (false )
42
43
case "dev" :
43
44
cli .Serve (true )
45
+ case "version" :
46
+ fmt .Println ("esm.sh CLI " + cli .Version )
44
47
default :
48
+ for _ , arg := range os .Args [1 :] {
49
+ if arg == "-v" {
50
+ fmt .Println (cli .Version )
51
+ return
52
+ }
53
+ if arg == "--version" {
54
+ fmt .Println ("esm.sh CLI " + cli .Version )
55
+ return
56
+ }
57
+ }
45
58
fmt .Print (helpMessage )
46
59
}
47
60
}
You can’t perform that action at this time.
0 commit comments