html2jade
html2jade copied to clipboard
Areas in need of refactoring
- CLI options are rather poor in design and in features. In particular, stdout output support is missing.
- Overall structure needs rethinking to cleanup accumulated workarounds.
- JSDOM dependency. Useful but most of its functionality is unnecessary for simple HTML to Jade conversion.
Hi, maybe you could also consider refactoring the parsing part to make it synchronous.
I tried to find the a way to do it with the current code, but the loading through jsdom already seems to make it asynchronous.
Right now I have to iterate my array, make them all into promises etc. a lot of extra code where basically I just need a utility method to convert html into jade.
Anyway, the current code works very well, so big thanks for that :-)
Until ES6 yield support is broadly available, I am afraid your best path to synchronous use of html2jade is child_process. :-)
ES6 yield support is available now :)