I have implemented this part.
- Changes in codegen.Generate() and templates structure.
codegen.Generate() should be able to figure out which framework to use depending on the input parameters.
Please take a look at the PR: Shpota/goxygen#32
--frontendoption. These are breaking changes and I'm going to merge them only after I check and test everything precisely. I have not included the regenerated
clipackage at this moment, but rather introduce non-breaking changes in the
codegenpackage that would allow the further extension. I was also thinking on reusing the similar files in js and ts projects (like env setup, images, etc) but I haven't tried developing this concept yet.
go.sumduring generation. It is useful as the user would get the latest patches when these files are generated on their machine. At the same time, some patches might introduce breaking changes (they should not, but it is still possible).
I am sorry for not responding for long. It's been quite a hard month for me and I didn't have enough time to work on the project. I would propose to continue the discussion on adding typescript next week. I am planning to release a new version with relation databases support on Monday/Tuesday and then we could discuss how to add typescript support and the pros and cons of having templates in the same repository.
In the meantime, if you have time and desire it would be great if you could work on CI enhancements. As we're adding more and more technologies it's getting harder to control the consistency of templates. I've done some work in this area and now templates are verified by building a docker container with the generated application. It ensures that both JS and Go builds are working, at the same time, it doesn't guarantee that the application is working. I think we can improve this by actually running the application with
docker-compose. The idea is that we can run the application, wait until it starts and make a
curl request to ensure that it's responding. What do you think about this?
create-react-app, Angular CLI or Vue CLI - they are already doing this very well. Goxygen is meant to be used as a stating point for generation of full stack projects.