Proof of concept for template-based client-side web applications
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
README.md
demo.html

README.md

Chef's Hat

Proof of concept for template-based client-side web applications

Configuration in short

zipName = "Chef's Hat Output.zip";
questions = {
  "1": {
    "type": "text",
    "tag": "[#text#]",
    "caption": "One line"
  },
  "2": {
    "type": "multiline",
    "tag": "[#multiline#]",
    "caption": "Multiline"
  },
  "3": {
    "type": "color",
    "tag": "[#color#]",
    "caption": "Color picker"
  },
  "4": {
    "type": "file",
    "tag": "[#file#]",
    "caption": "File input; only one for now"
  }
}
defFiles = {
  "demo.txt": {
    "type": "base64",
    "base64": "WyN0ZXh0I10KWyNtdWx0aWxpbmUjXQpbI2NvbG9yI10KWyNmaWxlI10=",
    "isRecipe": true
  },
  "smile.gif": {
    "type": "base64",
    "base64": "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs="
  }
}

zipName is the name of the output ZIP file, questions is a list of inputs to get from the user, and defFiles is a list of files to use to generate output. Defining one of these as a recipe means that it will decode the Base64 into a string, then replace any occurances of tags with those inputs.