New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@basalt/twig-renderer

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basalt/twig-renderer

Render templates using Twig PHP, via this Node JS renderer.

latest
Source
npmnpm
Version
3.2.9
Version published
Weekly downloads
4K
-18.63%
Maintainers
2
Weekly downloads
 
Created
Source

Twig Renderer

Greenkeeper badge

Render templates using Twig PHP, via this Node JS renderer.

Special thanks to Salem Ghoweri for collaboration on this project!

How to Use

npm install --save @basalt/twig-renderer
const TwigRenderer = require('@basalt/twig-renderer');

const config = { 
  // see `./config.schema.js` for details
};

const twigRenderer = new TwigRenderer(config);

twigRenderer.render('@components/card.twig', { title: 'hi' }).then(results => {
  if (results.ok) {
    console.log(results.html);
  } else {
    console.log(results.message);
  }
});

Looking in tests folder can help.

How to Develop

npm install
composer install
npm run setup

Keywords

twig

FAQs

Package last updated on 11 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts