all repos — vite @ 92f2c4ae813c282dbca8aaa5130050996fe7a77a

a fast (this time, actually) and minimal static site generator

init.go (view raw)

 1package main
 2
 3import (
 4	"os"
 5	"path/filepath"
 6)
 7
 8func viteInit(path string) {
 9	paths := []string{"build", "pages", "static", "templates"}
10	var dirPath string
11	for _, p := range paths {
12		dirPath = filepath.Join(path, p)
13		err := os.MkdirAll(dirPath, 0755)
14		if err != nil {
15			printErr(err)
16			return
17		}
18	}
19	fp, _ := filepath.Abs(path)
20	printMsg("created project:", fp)
21}