tj / consolidate.js

Template engine consolidation library for node.js
3.48k stars 353 forks source link

Improve Marko Implementation (support v4 & handle cached templates) #268

Closed eikaramba closed 7 years ago

eikaramba commented 7 years ago

Marko changed its implementation and thus "The render callback will no longer receive a string in Marko v4. Use renderToString(data, callback) instead" See https://github.com/marko-js/marko/pull/450.

This change is compatible with the current stable public version.

eikaramba commented 7 years ago

FYI: travis build failed because of bracket, not because of marko

8lueberry commented 7 years ago

I'll check the bracket error

8lueberry commented 7 years ago

Fixed on bracket: https://github.com/danlevan/bracket-template/pull/17 (version 1.1.4) Also added a consolidate test on the project

Should be able to rerun the test and it will work

hoichi commented 7 years ago

Oops. Should have looked for your PR before submitting my own.

Anyway, shouldn’t we also bump the Marko version in the dev dependencies? And what’s your take on the caching tests problem?

eikaramba commented 7 years ago

i didn't looked into the caching stuff, but you are right and i think it might conflict. Anyway as far as i can tell the whole system works currently for me. And he also creates the marko compiled files resp. updates them when i change something. I believe this is currently only done when requiring it, thus only when node restarts.

hoichi commented 7 years ago

Well, yes, the update scratches my itch as well: it fixes metalsmith-layouts with Marko 4. But, if we want to do things properly, I think tests should pass too.

That said, if Consolidate.js is as abandoned as it looks and no maintainer comes along, a working fork is our best hope anyway, and in that case, who cares about caching tests. I know I don’t.

niftylettuce commented 7 years ago

Hey if you can help maintain let me know - niftylettuce@gmail.com

eikaramba commented 7 years ago

because this pull-request needs to be merged, so that consolidate.js works with marko i would like to offer my help maintaining it