alephium / alephium-frontend

A monorepo containing all things frontend on Alephium.
Other
13 stars 10 forks source link

Convert electron.js main process file to TypeScript and break it to smaller files #936

Open nop33 opened 1 week ago

nop33 commented 1 week ago
nop33 commented 1 week ago

I spent a few hours today working on this. I converted the electron.js to a TypeScript and split it into multiple files. Now the conversion from TS to JS needs to be done properly.

Progress branch: https://github.com/alephium/alephium-frontend/tree/convert-electron.js

Useful resources:

nop33 commented 1 week ago

@mvaivre Yesterday, while researching the convertion of our electron.js main process file into TS, I fell into the rabbit hole of checking out other projects to see how they structure their main and render process of their electron apps. The consensus appears to be to have these 2 subfolders:

src/main
src/render

where all files related to the Node.js part of the application (aka, main process, aka electron.js) is under src/main and everything related to the render process (aka React) in the src/render.

Lastly, I've been trying to figure out whether they use separate tsconfig for compiling JS to TS for the main process files and the render process files. Some projects do, others don't. More investigation needed.

nop33 commented 1 week ago

Build tools:

Vite related tools:

Resources: