all repos — vite @ 1e6bde1d6ac06b0921c56a935ddeaa4c8775e055

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}