Giter VIP home page Giter VIP logo

Comments (4)

voxpelli avatar voxpelli commented on July 23, 2024

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.

glennjones avatar glennjones commented on July 23, 2024

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.

voxpelli avatar voxpelli commented on July 23, 2024

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.

glennjones avatar glennjones commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.