Closed ming-codes closed 10 years ago
Interesting suggestion. I used jsdom
instead of using htmlparser
directly because I wanted to cover javascript generated document as well. Perhaps a good compromise is to use static HTML conversion as default and make dynamic document conversion an option.
I just realized that removing jsdom
dependency from html2jade
will require adding a htmlparser
-specific layer to simulate DOM API which is required to continue supporting convertDocument
method.
Given that amount of change is not trivial, I'm going to defer this issue until later. Of course, you are welcome to fork and hack as always if you can't wait. :-)
version 0.7 replaces jsdom
with jsdom-little
which apparently don't have problematic contextify
dependency. while not exactly matching this issue, it's a move in the right direction.
@lightblade Please close this issue if you feel your needs are met. Leave it as is otherwise. Thx.
Sure. Thanks for getting that out.
Hi,
I think the dependency on jsdom is unnecessary. For the purpose of just converting from html to jade, I do believe using the dom produced by htmlparser should be sufficient.
There are a lot of problem surrounding jsdom. Mainly because jsdom has a hard dependency on contextify...which is a binary library that isn't pure js. Contextify has build issue in a lot of environments and some environment (like cloud9 ide) does not allow binary libraries to run on their platform.