Support loading a template from disk

Closes #4
This commit is contained in:
Kyle Fuller
2014-10-25 15:45:57 +01:00
parent 455845d80c
commit 758bf352c1
2 changed files with 25 additions and 3 deletions

View File

@@ -22,11 +22,11 @@ let context = Context(dictionary: [
]
])
let template = Template(path:"template.stencil")
let template = Template(named: "template.stencil")
let result = template.render(context)
if let error = result.error {
println("There was a syntax error parsing your template (\(error)).")
println("There was an error rendering your template (\(error)).")
}
println("\(result.string)")