Open jeffbdavenport opened 7 years ago
Do you want to use mthaml inside nodejs stack (coffee ...
command uses node.js) ? What is the purpose?
MThaml compiler is made on PHP (as twig is), so you will need php.exe anyway. Perhaps, until you rewrite all lexers, parsers and other parts on javascript to be used inside nodejs stack. Correct me, if I'm wrong.
There are several implementations of twig compiler for js, but twig is much more popular than mthaml is. So if it helps - you can convert mthaml-> twig by php, and twig->html by javascript (node).
You still can compile *.haml files with php your_script_that_generates_html.php > result.html
For instance in Magento 2 the template files are written in plain php / html code in a .phtml file. But I don't want to just include the entire MtHtml code into the Magento 2 module because that is just unnecessary overhead. I was hoping to have something that I could write and manage the php / html code in a slim format, and the export the files into .phtml files. I can't just convert it to plain html and put that into the module that would break the module and make it unusable.
i think mthaml could be converted to php+html, why doesn't it fit your goals?
Does it actually output the php+html? Or is it just saying that it interprets it that way? In other words can I write a short script with mthtml to save the php+html output to another file?
This program looks quite awesome, however it's unrealistic to include the entire MtHaml API into a custom PHP module for an existing platform, it would be awesome if I could convert my MtHaml files into phtml files. Like the coffeescript command
coffee -c $file
would do.