We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f989e0 commit 5f552ccCopy full SHA for 5f552cc
2 files changed
cli/version.go
@@ -0,0 +1,3 @@
1
+package cli
2
+
3
+const Version = "v136"
main.go
@@ -20,7 +20,8 @@ Commands:
20
dev Serve the web application in development mode with live reload
21
22
Options:
23
- --help Display this help message
+ --version, -v Show the version of esm.sh CLI
24
+ --help, -h Display this help message
25
`
26
27
func main() {
@@ -41,7 +42,19 @@ func main() {
41
42
cli.Serve(false)
43
case "dev":
44
cli.Serve(true)
45
+ case "version":
46
+ fmt.Println("esm.sh CLI " + cli.Version)
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
55
56
57
58
fmt.Print(helpMessage)
59
}
60
0 commit comments