upgrade Electron to latest ^8.0.3, ES6 fixes and refactor #236
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I ran in to many issues from an out of date Electron package when building the frontend (electron-prebuilt was discontinued 3 years ago!). It would've been possible to play around with nvm but decided it was more worthwhile to refactor it - security issues and portability considered. The branch has been tested on MacOS but should also now play smoothly with different machines:
Electron upgraded to ^8.0.3, remove unused packages
Refactored, use ipcMain / ipcRenderer
Change vars and functions to ES6-style const / let / () =>
Remove redefined vars and path util / path var conflicts
Add failsafes for defaultSettings; if a setting.json hasn't been reloaded it will try to resolve two paths: "../../../" (ie. openFrameworks), and "../../of-v" (ie. release download)
General spring-cleaning of logs and unused vars
Switch to yarn over npm; and add yarn.lock into repo
I did some work earlier this evening that adds optional preprocessor flags for addons to the CLI and also frontend, so accidentally did this refactor over the top (not tryin' to sneak it in). If that doesn't fit with the PG vision then feel free to remove it from index.html, baseProject.h/cpp etc.