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

Does not work under Node 0.11.x and 0.12.x #87

Open
resistdesign opened this issue Oct 8, 2014 · 17 comments
Open

Does not work under Node 0.11.x and 0.12.x #87

resistdesign opened this issue Oct 8, 2014 · 17 comments

Comments

@resistdesign
Copy link

When supplying a file that has a DIV as the outer most element I only get the DIV in the jade file and not any of it's children.

@resistdesign
Copy link
Author

Seems to be an issue when running node 0.11.x.

@donpark donpark changed the title No child nodes... Does not work under Node 0.11.x Oct 8, 2014
@donpark
Copy link
Owner

donpark commented Oct 8, 2014

Looks like most of the unit tests fails under Node 0.11.x with similar symtom (child nodes missing or truncated). Primary suspect is HTML parser or DOM implementation modules because html2jade outputs what it sees.

@skandasoft
Copy link

any updates on this

@donpark
Copy link
Owner

donpark commented Dec 6, 2014

just tried with same result which is not surprising since jsdom-little hasn't changed.

do have to run html2jade under node 0.11.x?

@skandasoft
Copy link

I am trying to use this in latest chrome which I suppose has the latest node

@donpark
Copy link
Owner

donpark commented Dec 7, 2014

sorry but chrome, the browser, does not have node.js inside of it.

@skandasoft
Copy link

with atom it does

@donpark
Copy link
Owner

donpark commented Dec 7, 2014

Yes, Atom uses both Chrome and Node.js.
Have you tried running html2jade in the browser? See Programmatic Usage section of the README.md file for example. If you're using tools like browserify, you'll need to add jsdom-little module to the tool's list of modules to ignore.

@donpark
Copy link
Owner

donpark commented Jan 25, 2015

TO THOSE WHO ABSOLUTELY NEED TO RUN HTML2JADE UNDER 0.11:

Try forking and replacing jsdom-lite dependency with jsdom. According to @zxdong262, this makes html2jade run under 0.11.x. Thx.

@donpark donpark changed the title Does not work under Node 0.11.x Does not work under Node 0.11.x and 0.12.x Feb 13, 2015
@paazmaya
Copy link

How about then switching away from jsdom-little completely and head over https://github.com/cheeriojs/cheerio?

@donpark
Copy link
Owner

donpark commented Feb 19, 2015

Cheerio is definitely an option since jsdom-little appears to be abandoned. Only problem is I don't have a desperate need since I can just switch to Node.js 0.10 or use one of several web version. In other words, PR is welcome as long as backward compatibility is maintained to minimize backfire. :-)

@paazmaya
Copy link

Working in a PR.
Is there are use case when the library is used outside the Node.js context? Since there are things like this:

if module?
  isNode = true

@donpark
Copy link
Owner

donpark commented Feb 20, 2015

Ah, yes, three AFAIK: bower, browserify, scalate. there might be other browser use-cases that could break.

BTW, let me know if you'd like to be added as a collaborator. This project needs someone would could give it more TLC.

@paazmaya
Copy link

paazmaya commented Mar 2, 2015

Sorry for the silence.

Given the above requirements, it would seem that Cheerio is not the way to go then.
I started looking at taking the latest jsdom 3.x in use, since 4.x is only for io.js.

@donpark
Copy link
Owner

donpark commented Mar 2, 2015

yeah. that was my conclusion last time I looked at Cheerio.

@Nedomas
Copy link

Nedomas commented Aug 10, 2015

For anybody who want to run it on 0.11 or 0.12, you can use my fork for the time being. I just changed jsdom-little to jsdom dependency.

#100

"dependencies": {
  "html2jade": "Nedomas/html2jade"
}

@donpark
Copy link
Owner

donpark commented Dec 29, 2015

Verified that html2jade works with Node.js v4.
Reducing bug level to minor.

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

5 participants