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

cleanup and refactor #77

Open
stevegt opened this issue Oct 23, 2021 · 2 comments
Open

cleanup and refactor #77

stevegt opened this issue Oct 23, 2021 · 2 comments

Comments

@stevegt
Copy link

stevegt commented Oct 23, 2021

While working on #66 and #76 I'm finding that working on this project is pretty unwieldy due to half of the code being in a different branch -- it really needs to be refactored into one branch. As things stand right now, it's certainly chasing off contributors -- taking a look at the forks makes me think there are a bunch of folks who have done a lot of work but who haven't been able to merge what they've done back into the master repo -- there are some duplicate efforts going on out there as well. I'm finding that the split-branch situation turns what should be a fun set of enhancements into a real chore.

I'm adding a stanza to the Makefile in my own fork to manage the two branches, copying assets over as mentioned in the comments in #66, but it's a horrible kludge.

@rodrigo-brito, you mention in #66 that the split branches was due to getting github to recognize the project as Go rather than javascript, but I'm not following that reasoning -- why do we care what language github shows for the project? Mixed-language projects are common -- any large project is going to be mixed-language. There must be something I'm missing.

Other refactoring that would help:

  • better version control of node modules including yarn, e.g. committing package.lock, would help -- I had to do some hunting around to figure out a working combination.
  • build instructions -- figuring those out took some time

I'd be happy to submit PRs to clean up any of this, but the split-branch situation makes that extra hard and is likely a prereq.

stevegt added a commit to stevegt/gocity that referenced this issue Oct 23, 2021
- partial workaround for rodrigo-brito#77
- add `make build-with-assets` workaround
- put handle/assets/, /node_modules, and /build in .gitignore for now
stevegt added a commit to stevegt/gocity that referenced this issue Oct 23, 2021
- closes rodrigo-brito#76
- adds package.lock for versioning of npm modules, yarn version in package.json
- generates more complex (chunked js) structure for assets
  - assumes build is via `make build-with-assets` in master branch, or equivalent
  - Makefile in stevegt's fork at commit 3a47b3d
  - see rodrigo-brito#77 for discussion
@rodrigo-brito
Copy link
Owner

A good cleanup: remove React.
The project core is the Go project. Frontend branch only helps with the view. Indeed, we can join both branches, but first, we need to remove React and use vanilla JS to helps with Go integration.

To transpile JS code, we can use ESBuild (https://esbuild.github.io/api/), which works with native Go code and works fine with embed files.

@emmanuelay
Copy link

Any progress on this? Would be great to have a monorepo with backend/frontend…

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

No branches or pull requests

3 participants