Comments (4)
Got it successfully working with React Native after the simplest possible removal: voxpelli@f083572 (Not suggesting as simple of a removal for the main project, just wanted to try if it actually had an impact)
By then just installing some of the Browserify replacement modules for built in Node ones I could successfully run this module in the iOS JS-runtime that React Native uses.
from microformat-node.
I have been thinking about creating a wrapping modules for microformat-node. Creating tools that use microformat-node to provide the indieweb authorship discovery etc. I don't want to increase the scope of this project beyond parsing microformats. I could consider moving URL-fetching over to that type of module.
At the moment I am using parseUrl()
quite a bit so just remove it without creating a wrapping module would causes quite a lot of duplicated code in my projects.
I have just finished a major update to https://github.com/glennjones/microformat-shiv. Have not used React Native, but did you consider using microformat-shiv rather than a Browserify version of this project?
I now want to align the code in microformat-node and microformat-shiv projects more closely. I am going to set up a dev branch to look at much closer integration. Shiv is getting a bit more love at the moment as Mozilla are getting ready to include it Firefox and FirefoxOS.
I have an issue that cheerio works well in node.js env, but to get speed in browsers I need the newer W3C DOM 3 features. I would like to support both cheerio, 'jsdom' (as requested in #20) and the browser, but performance demands may mean a more complex solution.
Lots to think about! - I will look at the cross project integration first and deal with modularisation as secondary part of the larger architecture problem.
from microformat-node.
I did try microformat-shiv
but as React Native runs using the iOS javascript runtime, anything that isn't basic javascript or polyfillable by Browserify won't work there, and as there's no DOM within a basic javascript runtime the microformat-shiv
doesn't work there.
Could one perhaps create adapters to enable support for browsers, jsdom
as well as cheerio
? Have three different ones that sits between the use of DOM-like-methods and the actual DOM/cheerio-methods? Or do you think that would cause too much overhead and/or complexity?
from microformat-node.
This made sense as I align the APIs for this project and https://github.com/glennjones/microformat-shiv. So the new interface has just a get
method which you can pass either a HTML string or a Cheerio DOM object.
from microformat-node.
Related Issues (20)
- Error when parsing http://www.boemiadigital.com/
- Error when parsing 'http://www.limitedtoendodontics.com'
- Error when parsing www.markgordondentistry.com HOT 1
- Parsing an h-entry with a root of <article> results in an empty h-entry HOT 3
- parseUrl promise not working HOT 2
- parseDom (feature request) HOT 4
- p-name breaks on empty text HOT 5
- Can't find '../test/testWriter.js' from bin/microformat-node HOT 2
- HTML entity handling HOT 3
- Update microformat-shiv dependency reference HOT 1
- Regression in text parsing of weird XSS:ish content?
- crash on certain input HOT 2
- crash on certain markup HOT 7
- Truncated Dates (bday / without years) are not parsed HOT 2
- Backcompat parsing conflicts
- Some URL's causes library to "hang"
- href ignored for u-* properties HOT 1
- Alternative node/JS microformats parser
- Dependency "ent" uses deprecated Node punycode module HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microformat-node.