-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Browserify support #268
Comments
Okay, we've got multiple problems: First of all, I opened fb55/entities#12, which will cover the entity support. Next, cheerio should, as discussed before, remove the wrapper around CSSselect. There is no reason to keep it, and it causes problems in this case. Finally, the API import is still problematic; it should probably be changed in cheerio. (It would be awesome if browserify would support As far as the functionality is concerned: I recently played with using CSSselect for querying the browser DOM, and left the replacement in the package.json. As a result, it found no elements. This is fixed now; I'll publish a new version soon, which will contain the fix. FYI, you can load your browserified cheerio version in jsconsole, which is much better for playing with it :) |
@sindresorhus the web workers is a good point. My personal preference for package managers is to use component, which I believe is compatible with browserify using a |
@matthewmueller any reason to keep it around?
Shouldn't be too bad manually requiring them for now.
Nice, didn't know about that one :) |
Simple fix to get around the conditional require for lib-cov.
|
It would be useful if Cheerio could be browserified (or even better, offered an official browserified build). I need it for Titanium, but it could also be useful in Web Workers and any other non-browser/node JS platform. Seeing as Cheerio is mostly a string manipulations library it should be possible.
I had to do a few changes to Cheerio to get it running (i used brfs to inline the two fs calls), but I'm having issues with it not persisting any of the changes.
Testcase (gist) (open console)
^ It doesn't change the text.
The text was updated successfully, but these errors were encountered: