andreypopp / reactify

[DEPRECATED] Browserify transform for JSX (superset of JavaScript used in React library by Facebook)
MIT License
690 stars 62 forks source link

Use peerDependencies instead of dependencies #54

Closed irae closed 9 years ago

irae commented 9 years ago

Requiring react-tools as dependencies, means the transpilation is only possible with the version on reactify package.json. By moving to peerDependencies, when requiring a different version of React the transpilation should just work. Of course this might eventually break but different projects will want to use different versions of the trnaspiler anyway, so I am suggesting to addopt peerDependencies.

The main reason I am creating this pull-request is that I am using new features on React 0.13-rc1 and I need the transpilation to be in the same version I am requiring from React.

I hope you like the idea, though in the long run, if react-tools introduce API changes, it might mean supporting more then one version at a time.

fahhem commented 9 years ago

+1 to this. I ran into this problem and so will anyone trying to use the latest React

andreypopp commented 9 years ago

I don't think peerDependencies is the way to go as npm now warns that peerDependencies won't be installed automatically in future npm version.