tj / consolidate.js

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

Add squirrelly support #299

Open nebrelbug opened 6 years ago

nebrelbug commented 6 years ago

Squirrelly is a high performance ExpressJS Template engine: https://nebrelbug.github.io/squirrelly/ https://www.npmjs.com/package/squirrelly

doowb commented 6 years ago

Please submit a PR with code, tests, and add the links to the README.md.

nebrelbug commented 6 years ago

Will do

nebrelbug commented 6 years ago

My forked repo contains code and links, and squirrelly works (I tested it) but I'm not sure how to do tests.

doowb commented 6 years ago

Basically, just add a folder to the test/fixtures folder for squirrelly with a template. Then add a line to the main test file that looks like the lines for the other engines.

If squirrelly supports helpers, filters, and/or partials like some of the other engines, then you can follow the pattern of the other engines to add templates and tests for those features.

Then do a PR from your branch and I'll take a look and let you know if there's anything that should be changed.

nebrelbug commented 6 years ago

Great! I'll do that.

nebrelbug commented 6 years ago

@doowb sorry for the long delay! I've been completely rewriting Squirrelly.

I just made a pull request #317 which adds Squirrelly, and all tests (except for Hamlet) pass, including partials and helpers.

Would you mind reviewing the pull request?

Thanks so much!

titanism commented 1 year ago

Will be merging your PR!

We have forked this repository for maintenance and released it under @ladjs/consolidate, see https://github.com/ladjs/consolidate.js. We have merged PR's and updated it for email-templates. Please click the "Watch" button to get notified of all releases at https://github.com/ladjs/consolidate.js. Thank you 🙏

Screen Shot 2023-06-08 at 3 05 12 PM

PR welcome at the new repo once new release is published today!

titanism commented 1 year ago

Hi there - we unfortunately had to drop squirrelly support due to some issues in latest release of consolidate v1.0.0.

We commented out the code because we're not too familiar, but you might want to look at this stuff here and submit a working PR:

https://github.com/ladjs/consolidate/blob/2bf0a2012e3f8af20e806593b66327c7c28216da/lib/consolidate.js#L1898-L1928

https://github.com/ladjs/consolidate/blob/2bf0a2012e3f8af20e806593b66327c7c28216da/test/consolidate.js#L72-L74

https://github.com/ladjs/consolidate/blob/2bf0a2012e3f8af20e806593b66327c7c28216da/test/shared/helpers.js#L40-L61

(we basically tried to upgrade to v8 of squirrelly and could not find solutions to the errors from running npm test)