Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Areas in need of refactoring #47

Open
donpark opened this issue Jan 14, 2013 · 3 comments
Open

Areas in need of refactoring #47

donpark opened this issue Jan 14, 2013 · 3 comments

Comments

@donpark
Copy link
Owner

donpark commented Jan 14, 2013

  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
Copy link

rhalff commented Jun 22, 2013

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
Copy link
Owner Author

donpark commented Jun 22, 2013

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

@sonicoder86
Copy link

ES6 yield support is available now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants