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.

28 lines
638 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 newFolderPath = "./webOutput"
  8. const konstruiConfigFile = "konstruiConfig.json"
  9. func main() {
  10. c.Green("getting files from /webInput")
  11. c.Green("getting conifg from file konstruiConfig.json")
  12. //READ CONFIG: konstruiConfig.json
  13. readKonstruiConfig(rawFolderPath + "/" + konstruiConfigFile)
  14. c.Green("configuration:")
  15. fmt.Println(konstruiConfig)
  16. c.Green("templating")
  17. //create directory webOutput
  18. _ = os.Mkdir("webOutput", os.ModePerm)
  19. //DO TEMPLATING
  20. startTemplating(rawFolderPath, newFolderPath)
  21. c.Green("webpage finished, files at /webOutput")
  22. }