Open yosssi opened 10 years ago
Hi Yosssi,
I just added support for martini-contrib/staticbin to martini-contrib/render (https://github.com/hypebeast/render). Unfortunately, I didn't check the open pull requests for render and overlooked your work.
I tested your fork and it works quite well for me. Great work and thanks for the great staticbin library.
Hi @hypebeast,
Thanks for your comment and reviewing!
Maybe, it's a good idea to check if the asset is actually a template. Otherwise, non template files with the same extension as the templates gets compiled, too. It should be enough to check if the asset is part of the templates directory.
Oh, you are right and I didn't notice that! I fixed it.
Thanks for your valuable advice!
Hope that this PR will be merged and we will be able to use this feature soon.
I hope it to :)
:+1:
:thumbsup:
@pboehm @donovanhide Thanks!
:+1: merge please :D
I added a feature of loading templates from binary data generated by go-bindata.
I created
martini-contrib/staticbin
so that Martini can serve static files from binary data.By adding this feature on
martini-contrib/render
, a web application using Martini can be compiled into a single binary file completely.I would be glad if you could merge this PR.
[Changes]
Asset
,AssetName
onOptions
.filepath.Walk
toload
function.options.Asset
andoptions.AssetNames
are set, load templates from binary data. Otherwise, load templates from files as before.I thought of creating a new middleware which has this feature. But
martini-contrib/render
had various important features and I thought it was not good idea to create a new middleware similar to this one, so I decided to add this feature on the existingmartini-contrib/render
middleware.Thanks.