main.go (view raw)
1package main
2
3import (
4 "fmt"
5 "os"
6)
7
8func main() {
9 args := os.Args
10
11 helpStr := `usage: vite [options]
12
13A simple and minimal static site generator.
14
15options:
16 init PATH create vite project at PATH
17 build builds the current project
18 new PATH create a new markdown post
19 `
20
21 // TODO: make arg parsing less shit
22
23 if len(args) <= 1 {
24 fmt.Println(helpStr)
25 }
26
27 switch args[1] {
28 case "init":
29 initPath := args[2]
30 viteInit(initPath)
31 case "build":
32 viteBuild()
33 case "new":
34 // newPath := args[2]
35 // viteNew(newPath)
36 }
37
38}