Helping you on your journey to EdgeTX
This application uses node-usb
when running in electron. In order to compile the bindings
some build libraries are required depending on platform. For MacOS and Windows, these should
already be built in.
Linux
$ sudo apt-get install build-essential libudev-dev
This software is designed to run on node@20
which can be installed with Fast Node Manager
Enable or install yarn package manager
# For Node.js <16.10
$ npm i -g corepack
# For Node.js >=16.10
$ corepack enable
Install deps
$ yarn
Developing
# Start electron and web environments in watch mode
$ yarn start
# Start web environment only
$ yarn start:web
# Storybook component environment
$ yarn storybook
Building
# Build and pack electron app (outputs renderer assets too)
$ yarn build
# Compile only web environment
$ yarn compile:web:production
Run tests
$ yarn test
Run e2e tests - requires web or app to be built
# Web app tests
$ yarn e2e:web
# Electron app tests
$ yarn e2e:app
Lint
$ yarn lint:all
# Or yarn lint <file>
Format (this codebase has enforced formatting with prettier)
$ yarn fmt
Extract new translation strings
$ yarn extract-locales
Translation strings are stored in the ./locales
directory.
To contribute a language which doesn't already exist:
./locales/languages.json
yarn extract-locales
)The namespaces (common, flashing, etc), provide some context for what the strings relate to
The application is split into different contexts
Main
or Renderer
.bootstap
files start-up .worker
files. Code designed only to run in WebWorker contexts.This application makes use of GraphQL
to request data across process boundary. Meaning that the renderer
process
is always entirely separated from the GraphQL execution environment.
Apollo Bus Link is used to facilitate the communication between the GraphQL execution process in Electron or Webworker environments.
Within WebWorker contexts, there are some browser functions which cannot be invoked within WebWorker contexts and so have to be invoked in the main process. In order to keep things in Electron and Web processes similar a set of Cross Boundary Communication functions have been defined.
A massive thank you to the software which makes all of this possible. Specifically:
node-usb
to support WebUSB within Node environments