Raynos / mercury

A truly modular frontend framework
http://raynos.github.io/mercury/
MIT License
2.82k stars 143 forks source link

Using vdom-to-html doesn't work (returns empty string) #192

Closed sekoyo closed 8 years ago

sekoyo commented 8 years ago

Hi, using node v4.2.1 and vdom-to-html with mercury doesn't work.

Don't know if this is related but I noticed that: require('virtual-dom/vnode/vnode'); // works require('vtree/vnode'); // doesn't work

For example:

var toHTML = require('vdom-to-html');
var h = require('mercury').h;
toHTML(h('p', 'Hello')); // Returns nothing

Am I missing something obvious? Thanks

danielnaab commented 8 years ago

@DominicTobias: vdom-to-html uses virtual-dom 2.0.0 while Mercury depends on 1.3.0, and v2 has breaking changes. You can make your own local mercury.js with dependencies on ^2.0.0, or just import the virtual-dom dependencies directly. Either way, you'll want to depend on just one version, so your build artifact doesn't duplicate code.

sekoyo commented 8 years ago

Thanks I'll just use 1.2.5 @ vdom-to-html

gcallaghan commented 8 years ago

Is there any plan to move Mercury to virtual-dom 2.x ?

panthershark commented 8 years ago

If there is a list of things that need to be done to upgrayedd mercury, I'll be happy to chip in and knock some of them out.

Please let me know how I can help.

crabmusket commented 8 years ago

Same here, I'd be happy to take on some work related to this.

DeepAnchor commented 8 years ago

I'd love to see this project advance, especially in regards to some of the points mentioned in the standing challenges thread -the most crucial of which I think is the having a formal component interface for people to design reusable components around.