shama / yo-yoify

Transform choo, yo-yo or bel template strings into pure and fast document calls
111 stars 17 forks source link

Use bel/appendChild, closes #49 #56

Open goto-bus-stop opened 7 years ago

goto-bus-stop commented 7 years ago

And closes #53

This uses the bel/appendChild export introduced by bel v5.1.3. It's breaking because now you have to have bel installed.

bcomnes commented 7 years ago

Peer dependencies are generally an anti-pattern. Any reason why we can't just include bel as a dep?

goto-bus-stop commented 7 years ago

yeah, i was thinking you could have it automatically pick up the correct appendChild for the version of bel you're using.

but maybe there's not much benefit to that, if you have to add a bel dep manually you might as well have to pick the correct yo-yoify version instead.

goto-bus-stop commented 6 years ago

ping, fixed the peer dep :)

yoshuawuyts commented 6 years ago

Won't this break on older npm versions? Perhaps an edge case, but there's a few people I know that are still using it :/

goto-bus-stop commented 6 years ago

I don't think so, with npm 2.x it would output something like require('./node_modules/yo-yoify/node_modules/bel/appendChild.js') and browserify would pick that up fine.

It's breaking because now you have to have bel installed.

this line in the OP no longer applies after https://github.com/shama/yo-yoify/pull/56/commits/9f58b94d7e0cef762f0055a130e24fa9765350ce, sorry for the confusion :D

finnp commented 6 years ago

I was just running into the issue #53. Wondering when it's going to be fixed ☺️

Also looking at this discussion I wonder if it wouldn't make sense to integrate yo-yoify into bel since they are so tightly coupled.

Then users could use e.g browserify entry.js -g bel/optimize -o bundle.js instead of installing yo-yoify (i guess that should work even if bel is a subdependency)