iris/_examples/view/template_jet_1_embedded
Gerasimos (Makis) Maropoulos 3945fa68d1 obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository
We have to do the same on iris-contrib/examples, iris-contrib/middleware and e.t.c.


Former-commit-id: 0860688158f374bc137bc934b81b26dcd0e10964
2019-10-25 01:27:02 +03:00
..
views Implement a new View Engine for the Jet template parser as requested at: https://github.com/kataras/iris/issues/1281 2019-06-22 21:34:19 +03:00
bindata.go Implement a new View Engine for the Jet template parser as requested at: https://github.com/kataras/iris/issues/1281 2019-06-22 21:34:19 +03:00
main.go obey the vote of @1370 (77-111 at this point) - add import suffix on iris repository 2019-10-25 01:27:02 +03:00
README.md Implement a new View Engine for the Jet template parser as requested at: https://github.com/kataras/iris/issues/1281 2019-06-22 21:34:19 +03:00

Jet Engine Example (Embedded)

Take a look at the ../template_jet_0's README first.

This example teaches you how to use jet templates embedded in your applications with ease using the Iris built-in Jet view engine.

This example is a customized fork of https://github.com/CloudyKit/jet/tree/master/examples/asset_packaging, so you can notice the differences side by side. For example, you don't have to use any external package inside your application, Iris manually builds the template loader for binary data when Asset and AssetNames are available through tools like the go-bindata.

Note that you can still use any custom loaders through the JetEngine.SetLoader which overrides any previous loaders like JetEngine.Binary we use on this example.

How to run

$ go get -u github.com/shuLhan/go-bindata/... # or any active alternative
$ go-bindata ./views/...
$ go build
$ ./template_jet_0_embedded

Repeat the above steps on any ./views changes.

html files are not used, only binary data. You can move or delete the ./views folder.