lvarayut / relay-fullstack

:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
https://lvarayut.github.io/relay-fullstack/
MIT License
986 stars 126 forks source link

Added simple generator #76

Closed Neitsch closed 7 years ago

Neitsch commented 7 years ago

So this is my first approach to adding generators. For now I left almost everything untouched and just have generators for client, server and config that copy all files over.

lvarayut commented 7 years ago

Hi @Neitsch, sorry for my very late reply here. What's the difference between the contents in this PR and the ones that are in the yeoman-generator branch?

Neitsch commented 7 years ago

I really don't see that it is possible to maintain all those branches. As a proof of concept I wrote a generator that has a default configuration and commits the generated code to another branch. In this use cases we would generate two configurations (master and canary). https://github.com/Neitsch/fb-fullstack

lvarayut commented 7 years ago

I got what you meant now, that would be a great option to solve this problem. In my opinion, we could develop everything inside our yeoman branch, we could actually merge canary into yeoman branch. Whenever we want to release a new version of Relay Fullstack, we run a yeoman script without selecting any options to generate the master branch. So, people can just clone the master branch and get the fresh minimum requirements to run Relay, or if they want to go further, they can absolutely use yeoman to add more options.

The development workflow would be as following:

In conclusion, we'll need to maintain only the yeoman branch. Is this exactly what you meant or what do you think about this approach?

Neitsch commented 7 years ago

Exactly. It requires a slightly deeper understanding of yeoman to apply any changes properly, but I think it would be great to have the generator and master in sync! @ncrmro any thoughts?

ncrmro commented 7 years ago

I'm all for it. Sound awesome! I'm not a super expert with yeoman right now. I'm betting we could automate the push to master after testing the generator.

lvarayut commented 7 years ago

Perfect, can I close this PR for now, and we can start merging canary branch into yeoman? We would discuss more details in https://github.com/lvarayut/relay-fullstack/issues/72

Neitsch commented 7 years ago

Sounds good. I'll get started on that!