twig-to-phtml
TypeScript icon, indicating that this package has built-in type declarations

0.3.4 • Public • Published

twig-to-phtml NPM version Build Status Coverage percentage

A Twig to PHTML transpiler

Installation

npm install twig-to-phtml --save-dev

Usage

import {Transpiler} from 'twig-to-phtml';
 
let transpiler = new Transpiler();
 
transpiler.transpile('{{foo}}'); // <?=$foo?>

API

Read the documentation for more information.

Contributing

  • Fork this repository
  • Code
  • Implement tests using tape
  • Issue a pull request keeping in mind that all pull requests must reference an issue in the issue queue

Running the test suite

The test suite can be run by executing the native test npm script:

npm test

Checking code coverage

This project adheres to a strict 100% code coverage policy. Code coverage can be checked by executing the cover npm script:

npm run cover

Generating the documentation

The documentation can be generated by executing the build:doc npm script:

npm run build:doc

This is usually not needed as the doc will be generated on every new release.

License

Apache-2.0 © Eric MORAND

Readme

Keywords

Package Sidebar

Install

npm i twig-to-phtml

Weekly Downloads

7

Version

0.3.4

License

Apache-2.0

Unpacked Size

30.6 kB

Total Files

7

Last publish

Collaborators

  • ericmorand