all repos — vite @ b64e5bd202d9b87397b0f4fd530110774ec5a324

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}