Closed hason closed 6 years ago
Hi, all PugPHP is already refactoring in a new project: https://github.com/phug-php
I work on it with the TaleJade developer (https://github.com/Talesoft/tale-jade) and the twig adapter is already planned in this new version.
Thanks!
Twig output extension started: https://github.com/pug-php/twig
It already handle basic code like this:
echo PugToTwig::convert('
ul#users
- for user in users
li.user
// comment
= user.name
| Email: #{user.email}
a(href=user.url) Home page
');
It will output the following:
<ul id="users">
{% for user in users %}
<li class="user">
{# comment #}
{{ user.name | e }}
Email: {{ user.email | e }}
<a href="{{ user.url | e }}">Home page</a>
</li>
{% endfor %}
</ul>
This should meet the expectations of your case: https://github.com/pug-php/twig
See https://github.com/arnaud-lb/MtHaml