Use the following command to install dependencies.
npm installUse the following command to run a build of the application.
npm run startCommand line arguments can be used to start the app for a specific architecture.
npm run start -- --arm64Use the following command to build the applications.
npm run packCommand line arguments can be used to build for a specific architecture.
npm run pack -- --arm64Docker builds provide a way to build the application for many platforms.
The following example uses the electronuserland/builder images to build the appliations for Linux.
docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|NPM_|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder
npm install
npm run distThe following example uses the electronuserland/builder images to build the appliations for Windows with the support of wine.
docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|NPM_|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine
npm install
npm run dist -- --win