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

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "os"
  5. )
  6. const rawFolderPath = "./webInput"
  7. const konstruiConfigFile = "konstruiConfig.json"
  8. func main() {
  9. c.Green("getting files from /webInput")
  10. c.Green("getting conifg from file konstruiConfig.json")
  11. //READ CONFIG: konstruiConfig.json
  12. konstruiConfigs := readKonstruiConfig(rawFolderPath + "/" + konstruiConfigFile)
  13. c.Green("configuration:")
  14. fmt.Println(konstruiConfigs)
  15. c.Green("templating")
  16. //create directory webOutput
  17. _ = os.Mkdir("webOutput", os.ModePerm)
  18. //DO TEMPLATING
  19. for _, konstruiConfig := range konstruiConfigs {
  20. _ = os.Mkdir(konstruiConfig.OutputDir, os.ModePerm)
  21. startTemplating(rawFolderPath, konstruiConfig.OutputDir, konstruiConfig)
  22. }
  23. c.Green("webpage finished, files at /webOutput")
  24. }