Development is done on the current "Active LTS" version of Node.js.
- Application
/src/index.ts
. - Main Electron Process
/src/main/index.ts
. - Browser Window
/src/browser/index.ts
.
When astexplorer.net is pulled from its Repository:
- Codemods at
/scripts/transforms/*.js
are run to:- Disable features which aren't suitable when run as a Desktop App.
- Inject [Redux Middleware] for the Electron App to communicate with the Web UI.
When the App is started:
/src/index.ts
- Configures whether logging is enabled.
- Starts the Main Electron Process.
/src/main/index.ts
- Creates the System Tray Menu and Browser Window.
- Listens for Events from them using [ipcMain].
/src/browser/index.ts
- Writes default configuration for the Web UI.
- Listens for Events from the Main Electron Process using [ipcRenderer].
- Listens for Events from the Web UI's Redux Store and forwards them the Main Electron Process using [ipcRenderer].
When a Transform is chosen in the Web UI:
- The Web UI's Redux Store dispatches an
SELECT_TRANSFORMER
Action. /src/main/index.ts
- Opens a File Dialog for the User to select a Transform .js file.
- Watches the file for changes using [chokidar].
- Bundles dependencies into a single .js file using [Rollup].
- Sends a
SET_TRANSFORM_CODE
Event to the Browser to update the Bottom-Left Panel of the Web UI.
The Web UI used on https://astexplorer.net is pulled from its repository at
https://github.com/fkling/astexplorer and checked into this repository at
/vendor/astexplorer/website
using yarn upstream:update
.
NODE_ENV=development yarn start