html2jade icon indicating copy to clipboard operation
html2jade copied to clipboard

Areas in need of refactoring

Open donpark opened this issue 12 years ago • 3 comments

  1. CLI options are rather poor in design and in features. In particular, stdout output support is missing.
  2. Overall structure needs rethinking to cleanup accumulated workarounds.
  3. JSDOM dependency. Useful but most of its functionality is unnecessary for simple HTML to Jade conversion.

donpark avatar Jan 14 '13 21:01 donpark

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 :-)

rhalff avatar Jun 22 '13 21:06 rhalff

Until ES6 yield support is broadly available, I am afraid your best path to synchronous use of html2jade is child_process. :-)

donpark avatar Jun 22 '13 21:06 donpark

ES6 yield support is available now :)

sonicoder86 avatar Mar 02 '15 18:03 sonicoder86