andrewhathaway / Winterfell

Generate complex, validated and extendable JSON-based forms in React.
http://winterfell.andrewhathaway.net
MIT License
785 stars 116 forks source link

distribute precompiled via npm #3

Closed VinSpee closed 9 years ago

VinSpee commented 9 years ago

Hi!

I really like where you're headed with this. To make adoption easy, you should set up a version task in the package.json that precompiles this package so it can be used without having the same build pipeline. See https://github.com/rackt/redux/blob/master/package.json for an example on how to do this well.

Keep up the good work!

keisans commented 9 years ago

:+1:

andrewhathaway commented 9 years ago

Hi @VinSpee and @keisans!

Great idea. I previously had a dist folder, but didn't commit it due to the fact that the built version included the React library, which isn't ideal as you'll have your own version of React installed.

Whats the usual way to get around this? Or is that acceptable?

Thanks.

VinSpee commented 9 years ago

@andrewhathaway I usually stand on the shoulders of giants in this case, and @react-redux does it like this:

This allows the consumer to use whichever version of react that they have, avoiding the double-dependency and any peerDep issues. Thanks!