Include HoganTemplate function as a standalone file #15

Closed
danielstocks opened this Issue Dec 27, 2011 · 4 comments

Projects

None yet

3 participants

@danielstocks

It would be useful if there was some kind of build script, that would automagically extract the HoganTemplate function, into a separate .js file that could be included in a web-browser, when parsing "pre-compiled" templates. It would make using tools like this more straight-forward:

https://github.com/danielstocks/hedgehog

Right now, you'll have to manually extract the HoganTemplate function from the hogan.js script, to avoid including the whole library in the browser.

Dust.js already does something like this:

https://github.com/akdubya/dustjs/tree/master/dist

Thanks for allt the great work on hogan.js btw, loving it so far!

@sayrer
Collaborator
sayrer commented Dec 28, 2011

This is now fixed on the trunk. Need to talk with @fat about pushing a new release.

@sayrer sayrer closed this Dec 28, 2011
@fat
Contributor
fat commented Jan 2, 2012

Pushed - also, @sayrer i added you as an npm owner :)

@danielstocks

Thanks a lot for your work on this! Greatly appreciated.

@ghost
ghost commented Dec 20, 2012

How does one get a hold of this HoganTemplate.js I have run into nothing but problems with Hogan at this point. Underscore * issue trying to make release 3.0 and what not. How do I go about extracting just the HoganTemplate part from at least build 2.0 . Hedgehog compiles my templates just fine but in the browser while trying to add 2.0 libraries I get Uncaught ReferenceError: HoganTemplate is not defined? Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment