You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
757 B

package main
import (
"fmt"
"os"
)
const rawFolderPath = "./webInput"
const konstruiConfigFile = "konstruiConfig.json"
func main() {
c.Green("getting files from /webInput")
c.Green("getting conifg from file konstruiConfig.json")
//READ CONFIG: konstruiConfig.json
konstruiConfigs := readKonstruiConfig(rawFolderPath + "/" + konstruiConfigFile)
c.Green("configuration:")
fmt.Println(konstruiConfigs)
c.Green("templating")
//create directory webOutput
_ = os.Mkdir("webOutput", os.ModePerm)
//DO TEMPLATING
for _, konstruiConfig := range konstruiConfigs {
_ = os.Mkdir(konstruiConfig.OutputDir, os.ModePerm)
startTemplating(rawFolderPath, konstruiConfig.OutputDir, konstruiConfig)
}
c.Green("webpage finished, files at /webOutput")
}