donpark / html2jade

Converts HTML to Jade template. Not perfect but useful enough for non-daily conversions.
MIT License
1.18k stars 156 forks source link

Areas in need of refactoring #47

Open donpark opened 11 years ago

donpark commented 11 years ago
  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.
rhalff commented 11 years ago

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

donpark commented 11 years ago

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

sonicoder86 commented 9 years ago

ES6 yield support is available now :)