Which hogan.js templeting package to use with express.js?
Asked Answered
O

1

7

The hogan.js template package that express provide is hjs, however, that package last update was a year ago, and the repo at github got issues opened also a year ago (though not really crucial ones).

There also seems to be more than one hogan.js package for express tempting at npm which left me confused!

Ostensible answered 27/8, 2013 at 20:11 Comment(0)
C
7

If you see hjs source code, it's only 63 or so lines and it require hogan.js to work, so it's just a wrapper to make it work on express.
The one I used is hogan-express which is also a wrapper for hogan.js (it's required in package.json) and it's no more than 150.

My point, to try to clarify things, it's that the important module is hogan.js all the rest modules to integrate in express are just wrappers. I believe is also worth to give a try to the consolidate module which also support Hogan.

By looking to githubs stars (not necesarily quality indicator) you will see

consolidate (*548) > express-hogan(*48) > hjs (*8)

If you are wondering why hjs was the "chosen" for the express command line the answer is this pull request You can see by your self what it takes to implement another module. So may be some one should report if hjs is giving problems and there is a better alternative. It's not hard to change it in express.

Coppery answered 27/8, 2013 at 21:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.