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

Improving architecture around codebase #57

Open
Venefilyn opened this issue Jun 19, 2024 · 4 comments
Open

Improving architecture around codebase #57

Venefilyn opened this issue Jun 19, 2024 · 4 comments

Comments

@Venefilyn
Copy link

Hey I'm thinking of contributing to this repo and also making it more approachable and in my opinion a bit easier to manage

To what degree do you want to handle this repository? My contribution would be to make a more standardized workflow and also transpile the JavaScript code into something that works in most browsers without needing special polyfills and so on

I was thinking of adding these things, but wanted to run them by you first @Beakerboy

  • Package management with pnpm
  • Vite for developing and compiling to a JS file that works on most environments
  • Adding a CONTRIBUTING.md for others who want to contribute to the project
  • Simplify local development (at the moment I'm not too sure what to do to develop locally)
  • Possibly using TypeScript
@Beakerboy
Copy link
Owner

My goal is to have something that runs as is from a GitHub.io. I am not a javascript expert and do not know the pros and cons of Typescript. Feel free to break these down into individual tasks/issues in the queue.

@Venefilyn
Copy link
Author

@Beakerboy So with something like Vite we would be able to use modules and still publish to github.io without any issues. It also allows us to use more modern features and still make it work with a bit older browsers, and reduce the filesize of the final JS and CSS files.

Then with TypeScript, it's basically just making types for JavaScript, So instead of

let my_var = null // default to null
my_var = "name"

we would do this

let my_var: string|null = null // default to null
my_var = "name"

Main pro of that is that we reduce mistakes, makes it easier to code (IMO), and encourages better design
Main con is that it is a bit more work as you need to think about types, you can't mix and match types without safely type checking

But overall it means potential mistakes are caught in development rather than live on the github.io page

I can spin up an example on my fork of how it would look and show you if you are interested in using any of these?

Primarily I just want to contribute to make the tool better but the tooling could use a glow-up :D

@Beakerboy
Copy link
Owner

I’m a fan of static analysis. When I use python and php I always go above and beyond to ensure all my typing is fully annotated.

I am not a javascript coder…or really a professional programmer. I kind of used this project to learn javascript to some extent, and some of it is still confusing to me, like the different flavors, importing properly, etc. A lot of this project has been assembled with the help of Google, Stack Overflow, and Reddit.

@Venefilyn
Copy link
Author

Okay, I'll set something up when I have time and you can try it out 🙏

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

2 participants