Questions tagged [twing]

3 questions
2
votes
1 answer

Cannot disable cache in Twing template engine (node.js, Express JS)

I'm using Express JS together with Twing (node.js implementation of Twig template engine) and created a template file (index.twig.html). I'm trying to update the template without stoping and starting node.js over and over again, but it seems to be…
Chris
  • 63
  • 1
  • 3
1
vote
0 answers

How to create a new filter in twing

I am using the below code to create a new filter in twig const twig = require("twig"); twig.extendFilter("date_format", (value) => { return value ? dateFNS.format(value.unixUTC, "MM/dd/yyyy") : null; }); Similarly, how can we create a new filter…
Benk I
  • 185
  • 13
0
votes
0 answers

How to avoid " returned from twing

I am using twig as below res.render("screen/index.twig", { name: 'word', columns: columns, }); It is working as excepted. Now I want to switch to twing and used below code const contents = await twing .render("screen/index.twig", { name:…
Benk I
  • 185
  • 13