Open clarktlaugh opened 7 years ago
Wow, nice one!
This is about 99% identical to the 'basic' template. I don't know if there is a straightforward way to accomplish the slight differences without all of the duplication?
I just updated this to include a new 'electron-app' template which is a version of 'app' that works in Electron. It's mostly the same as the original as well.
I've added comments within the review of the code to hopefully call out all of the places that needed to change, since it might be hard to really see them with all of the files showing as new.
@tracybarmore -- is there anything else I can be doing to help here? There hasn't really been any activity since mid-April.
The changes required to enable this to work for generating an Electron app are extremely minor, but they are in some of the template files, which require completely duplicating all of them (the reason this PR has 72 files). In the comments above, I tried to point out exactly what all of the necessary changes were, and it's only about 15 lines of changes / new code. I do think that having an entirely-new template for this adds a lot of duplication that just isn't necessary, so I could see how that might necessitate a change in the way the CLI handles templates.
One thought I had was to be able to have a common set of template files, then be able to just overwrite a few of them (so 'electron-app' would just use all files from 'app' and then carry around a patch or complete replacement for the changed files. Same for 'electron-basic' and 'basic').
What if we just start with the electron
template that is just the basic structure (similar to your electron-basic)? I would stay away from adding a lot of different templates for electron.
I really like the proposal here. But I believe the main goal of this template is to show how to use grommet + electron. There are lot of things in the app
template that will deviate the attention more to that than to understand what it takes to run grommet with electron. Hopefully it makes sense.
Thanks for your contribution and sorry for taking such a long time to get back to you on this.
Implements two new templates: