supnate / rekit

IDE and toolkit for building scalable web applications with React, Redux and React-router
http://rekit.js.org
MIT License
4.48k stars 258 forks source link

Idea: Add suport to custon rekit-boilerplate #90

Open dougllima opened 6 years ago

dougllima commented 6 years ago

Hi! Awesome work on Rekit!

Here's an idea to make it even better: Add a parameter on creating project so the user can pass a git repo with a custom boilerplate, and use a custom template.

Before anything, i have read the #86 answer, and agree with that. But if Rekit have a option to use custom boilerplate, users can create templates and "themes" I belive that this will help new users to get more interest on use Rekit.

As the boilerplate is complex, later a templace creator can be made to avoid mistakes mades by user.

I volunteer as tribute to help on any of this tasks 😛

supnate commented 6 years ago

Hi @dougllima , thanks the suggestion. Great idea! It's really a limitation that Rekit uses opinionated options/libraries for config, build and development. There are two possible ways to improve:

  1. Ask user what to choose when creating an app. Currently the only option is less or sass for styling.
  2. Support more boilerplates. As you suggested.

After more thinkings about it, it should be possible. The key is to add feature oriented folder structure to any boilerplate. And then place custom templates under the folder tools/templates in the boilerplate. If custom templates can't meet the requirement then create a Rekit plugin.

To make this happen it needs deep understanding about how Rekit works. I'll be glad to help if you could help on this.

I'm also writing an article about migrating existing projects to Rekit which will help understand Rekit works.

dougllima commented 6 years ago

Hi @supnate !

I'm glad that my suggestion was useful.

I have forked Rekit, so I can study about how it works and change the boilerplate used.

By the way, a naive short-term solution that I made on my local version to use custom templates was fork the boilerplate and them change the project creation code to use an additional parameter, the boilerplate repo.
My next step will be make some boilerplates (to landing pages, admin panel...) with a lot of changes and try to use it.

It's naive but will help me to understand a little more about Rekit and implement the soluction as you described.

This weekend I'll study a little more about how Rekit works, but I'm glad to help on this!

Also, feel free to send me this article ween it's ready, it will help me a lot!

supnate commented 6 years ago

Thanks @dougllima ! Looking forward to seeing your work on Rekit! For your information that not documented, Rekit also finds templates under tools/templates folder of the created project to create components/actions. The folder structure is the same as: https://github.com/supnate/rekit/tree/master/packages/rekit-core/templates

dougllima commented 6 years ago

Hi @supnate ! Sorry about the delay, though week. I have taked a look at the rekit code, specially on the templates thing, and maybe can start with some code tomorrow!

I'll keep posting if i need anything, and to keep you updated!

supnate commented 6 years ago

Hey @dougllima ! No worryies, just take your time. Thanks for the update!