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

Dependencies vs Boilerplates #5

Closed
iansinnott opened this issue Mar 25, 2016 · 4 comments
Closed

Dependencies vs Boilerplates #5

iansinnott opened this issue Mar 25, 2016 · 4 comments

Comments

@iansinnott
Copy link
Owner

Boilerplates are great as MVPs for starting new projects, but they have drawbacks:

  • Updates. Since you delete .git from the repo after cloning it there's no simple way to update the boilerplate
  • Flexibility. Sure you can customize anything in the repo after cloning it but once it's gone you can't get it back without reverting, and it's not easy to say "I want these features but not those"

Instead of a boilerplate it would be better to have a project dependency. I really like what Ryan Florence is doing with React Project and the idea of boiling less plates.

This boilerplate is just a quick way to get started building a static site with React Router, which is the overarching goal. I'd like to take overarching goal in a similar direction to React Project. It might even be optimal to include React Project as a dependency.

This is open for discussion. I'm just thinking out loud, but I think there could be some big wins in moving from boilerplate to dependency.

@her
Copy link

her commented Aug 27, 2016

So how could we convert your current boilerplate to something that relies more on dependencies? Are there any glaring tasks that would help inch towards this goal?

One thing I like about this project, more so than any others I've seen, is the focus on producing static react sites without a huge overhead (like Gatsby or phenomic)

@iansinnott
Copy link
Owner Author

I like the approach taken by create-react-app. Namely, the project is installed as a dependency and provides a binary that can be used from package.json. If the user every wants to customize things they can always eject and all the configuration files will be moved into the root directory. I like this approach a lot because it provides ease of use and also lets the user customize everything if they wish.

A dependency can also be continuously updated without affecting the application code. This is a problem I've had in my own use of this project that I'd like to solve: I create a project from the boilerplate, remove the .git repository and then can no longer easily update the boilerplate code whenever this repository is updated.

I would certainly welcome any input on what an ideal interface would look like.

@iansinnott
Copy link
Owner Author

I started experimenting with this idea and the webpack-2 branch has been updated to take advantage of this new approach. It does not depend on most of the build dependencies. Instead it imports the single app-time module which handles the build process and the dev server.

@iansinnott
Copy link
Owner Author

This has been implemented as of v3 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants