Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React v15 upgrade and fixes #1

Merged
merged 3 commits into from
Apr 23, 2016
Merged

React v15 upgrade and fixes #1

merged 3 commits into from
Apr 23, 2016

Conversation

bradchristensen
Copy link
Contributor

There are a few things here - sorry for dumping them all at once but I'm interested to get your feedback anyway 😄

  • Update to React 15.x
  • Update to Babel 6.x
  • Reference React as a peer dependency (it turns out this was Luke's idea Use peerDependencies for react reference JedWatson/react-select#88)
  • Bundle using webpack instead of browserify (fixes usage through npm - the browserify bundle didn't seem to work for me when I was including it in my project, so I messed around with it for a while to no avail, then just packed it with webpack instead and it worked first time) 😛
  • Fix main reference in package.json to point to webpacked script (fixes usage through npm)
  • Don't include React in the webpacked script (reduces bundle size)
  • Remove generated files from git while retaining them in npm (standard git practice, but it does mean that you can't reference the library by its git repo any more, you can only use the npm registry - thoughts?)
  • Bump to version 1.2.0 (due to republishing a couple of times as react-svg-graph-bradchristensen for testing purposes) but this should probably just be 1.1.0 for the main repo - thoughts?

* Update to React 15.x
* Fix main reference in package.json to point to browserified script
* Remove generated files from git while retaining them in npm
@jwarning
Copy link
Owner

Hey man. I'm happy with most of those changes. I have been meaning to upgrade some of my OSS stuff to React 15 etc.. so it's good to see you've done it anyway. 😄 To be honest I will probably remove gulp altogether and just use webpack as it's mostly unnecessary for the majority of simple cases I find. Afaik the whole peerDependency thing is no longer a thing as of npm 3? Does it make a difference still though?

@bradchristensen
Copy link
Contributor Author

bradchristensen commented Apr 17, 2016

Haha yeah, gulp does seem irrelevant these days. I haven't managed to completely get rid of it from my own projects yet though. Good to see you have jumped on the webpack bandwagon too 😄 It seems like peer dependencies are just used as hints in npm3 now, so they just throw warnings if those dependencies aren't installed. React is still installed as a dev dependency so that it can be bundled into the example app bundle though, and it has to be explicitly excluded from the webpack bundle.

@jwarning
Copy link
Owner

jwarning commented Apr 17, 2016

Cool, yeah I'll try get it merged soon. I may work on updating a couple other parts of it too and eventually adding more features when I have time haha. I'm happy to remove the generated files from git too, with the exception of the bundle for the demo site as it needs to be there.

@bradchristensen
Copy link
Contributor Author

Ah good point, guess it will have to be if it's hosted by github. I'll fix that up tomorrow.

@jwarning
Copy link
Owner

You happy with your changes at this point? If so I'll merge and test it a bit.

@jwarning jwarning merged commit dcfdf6a into jwarning:master Apr 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants