You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just published the new version of @nightlycommit/rollup-plugin-twig, a Rollup plugin dedicated to Twig and fueled by the next version of Twing (6.x).
In addition to the usual features expected from a Rollup plugin, it also come with some nice touches that you may appreciate:
Accurate Rollup error location:
[!] (plugin twig) Error: Unexpected "}"in"/home/ericmorand/Projects/rollup-tester/src/templates/index.twig" at line 3, column 21.
src/templates/index.twig (3:20)
1: <html>
2: <head>
3: <title>{{ title }</title>
^
4: {{ include('./head.twig') }}
5: </head>
at Object.transform (file:///home/ericmorand/Projects/rollup-tester/node_modules/@nightlycommit/rollup-plugin-twig/dist/index.mjs:151:35)
at /home/ericmorand/Projects/rollup-tester/node_modules/rollup/dist/shared/rollup.js:1005:40
Typing for the module exposed by the plugin when importing *.twig files:
Support for the new streaming capabilities of Twing:
/// <reference types="@nightlycommit/rollup-plugin-twig" />import{render}from"./templates/index.twig";import{createOutputBuffer}from"twing/dist/types/lib/output-buffer";constoutputBuffer=createOutputBuffer();outputBuffer.outputStream.pipe(process.stdout);render({title: "My Page"},{
outputBuffer
});
As Twing 6.x will add support for Twig 3 specification level in the next few days, the plugin will organically support Twig 3 out of the box.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Rollup community,
I just published the new version of @nightlycommit/rollup-plugin-twig, a Rollup plugin dedicated to Twig and fueled by the next version of Twing (6.x).
In addition to the usual features expected from a Rollup plugin, it also come with some nice touches that you may appreciate:
*.twig
files:As Twing 6.x will add support for Twig 3 specification level in the next few days, the plugin will organically support Twig 3 out of the box.
Let me know what you think. 😃
Beta Was this translation helpful? Give feedback.
All reactions