-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Factor out core react-scripts functionality for library scaffolding #423
Comments
I honestly think this idea is genius. Having a standard way to create libraries (designed specifically for react) will only encourage more people to contribute to the react eco system. Getting started and having to figure out how to set up webpack, babel, builds for the first time is a time consuming job. Having gone through this process a couple times I think a standardised way of doing this would be fantastic. Having the same setup across several projects would also mean more people will be familiar to the setup. But like you said Jimmy, I think the biggest gain most likely comes from ease of updating dev tool dependencies. I'm happy to help out, let me know what I can do! |
This is one of the use cases nwb addresses, as I was having the same issue maintaining multiple component projects and keeping all the tooling and config up to date. +1 for having an official |
Any thoughts on how this would in terms of modules? Should |
I would imagine |
We don’t have any immediate plans to build this. If somebody wants to submit a proof of concept, they’re welcome to. In the meantime we published our Babel preset and even some webpack utilities so it should be easier to build something like this separately. Jest configuration has also vastly simplified in the last couple of releases. |
I wonder FB already should be having some solution to tackle this? I really wish to create a component library but the thought of having to set it all up makes me cringe & end up copy pasting the code. Now it has come to the point of becoming a pain. |
We there at plone intend to make one of our project a |
I tried to make one: Still new though, but works for simple React UI library |
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:
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:
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.
The text was updated successfully, but these errors were encountered: