Description
cc @ryanflorence @ayrton @gaearon @jquense
This was intended as a dumb Twitter joke about "create-react-lib", but there's actually something to it.
Scaffolding React libraries hits the same point points as scaffolding React apps. However, in one way it's worse – library developers often have multiple library packages.
Getting a minimal library scaffolding up is pretty easy if you've done it a few times, but getting a good library scaffolding is time-consuming if you want to include all of:
- UMD build (unminified and minified)
- ES module build
- Coverage reporting on tests
It's just as difficult to keep stuff from going stale. I think I finally upgraded the last few of my libraries to Babel 6, but I'm not really sure, and it's a fair bit of work every time to make sure I remembered to set everything up appropriately. You can start a project by copying the last thing you did, but it's harder to keep stuff up-to-date.
Given that, it could be quite useful if some of the core functionality in react-scripts could be made reusable in such a way as to offer a "create-react-lib", where the main benefits would be:
- Reduce the amount of extra work required to get really good tooling set up
- Just update a dependency to freshen tooling dependencies
I haven't fully thought through how this would work, but I wanted to write this up real quick to lay out the pain points that I hope we can use functionality from here to resolve.