php2pug

0.3.4 • Public • Published

php2pug

PHP/HTML to Pug converter.

Node.js 5.0+ minimum. Uses depth-first search for DOM tree traversal, and ES6 generators.

Early stages. Very experimental.

Additions

  • Adds support for php code via use of :php filters
php2pug -f /path/to/file.php

or

const php2pug = require('php2pug');

const generatePug = php2pug("<div><?php echo 'Hello World'; ?></div>");

generatePug.then(function (pugText) {
    // pugText: div !{"<?php echo 'Hello World';  ?>"}
});

Package Sidebar

Install

npm i php2pug

Weekly Downloads

0

Version

0.3.4

License

MIT

Last publish

Collaborators

  • khalidhoffman