twig-to-phtml
v0.3.4
Published
Twig to PHTML transpiler
Downloads
17
Readme
twig-to-phtml
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