You decided to contribute to this project? Great, thanks a lot for pushing it.
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please file issue to report unacceptable behavior.
For local development, you can use yalc in order to apply changes made to electron-builder for your other projects to leverage and test with.
Env setup from scratch (line by line for an easy copy-paste)
pnpm i yalc -g
git clone https://github.com/electron-userland/electron-builder.git
pushd ./electron-builder
pnpm install
pnpm compile
find packages/ -type d -maxdepth 1 -print0 | xargs -0 -L1 sh -c 'cd "$0" && yalc push'
popd
You must link yalc's local "packages" to your project via the one-liner below (run from your project folder)
yalc link app-builder-lib builder-util builder-util-runtime dmg-builder electron-builder electron-publish electron-builder-squirrel-windows electron-forge-maker-appimage electron-forge-maker-nsis electron-forge-maker-nsis-web electron-forge-maker-snap electron-updater
The magical script for whenever you make changes to electron-builder! Rebuilds electron-builder, and then patches the npm modules in your project (such as electron-quick-start). Ready for copy-paste into terminal presuming electron-builder repo is at root level outside your project folder, otherwise adjust path as necessary.
pushd ../electron-builder
pnpm compile
find packages/ -type d -maxdepth 1 -print0 | xargs -0 -L1 sh -c 'cd "$0" && yalc push'
popd
To check that your contributions match the project coding style make sure pnpm test passes.
pnpm is required because NPM is not reliable and Yarn 2 is not so good as PNPM.
To build project: pnpm i && pnpm compile
If you get strange compilation errors, try to remove all node_modules in the project (especially under packages/*).
We use semantic-release, so we have very precise rules over how our git commit messages can be formatted.
To avoid google indexing, documentation files located in the branch docs. To clone:
git clone --single-branch -b docs git@github.com:electron-userland/electron-builder.git docsDocumentation files located in the /docs.
/docs is deployed to Netlify when next release is marked as latest and available for all users.
pip3 install mkdocs-material mkdocs markdown-include pymdown-extensions pygments --upgrade
You'll want to copy the mkdocs.yml file from the master branch and then: mkdocs build
Only IntelliJ Platform IDEs (IntelliJ IDEA, WebStorm) support debug.
If you use IntelliJ IDEA or WebStorm — ij-rc-producer is used and you can run tests from an editor (just click on Run green gutter icon).
Or you can create Node.js run configuration manually:
- Ensure that
Before launchcontainsCompile TypeScript. - Set
Node interpreterto NodeJS 8. NodeJS 8 is required to debug. - Set
Application Parametersto-t "test name" relative-test-file-nameif you want to debug particular test. E.g.-t "extraResources - one-package" globTest.js - Set
Environment Variables:- Optionally,
TEST_APP_TMP_DIRto some directory (e.g./tmp/electron-builder-test) to inspect output if test uses temporary directory (only if--matchis used). Specified directory will be used instead of random temporary directory and cleared on each run.
- Optionally,
TEST_APP_TMP_DIR=/tmp/electron-builder-test ./node_modules/.bin/jest --env jest-environment-node-debug -t 'assisted' '/oneClickInstallerTest\.\w+$'where TEST_APP_TMP_DIR is specified to easily inspect and use test build, assisted is the test name and /oneClickInstallerTest\.\w+$ is the path to test file.
Do not forget to execute pnpm compile before run.
When filing an issue please make sure, that you give all information needed.
This includes:
- description of what you're trying to do
- package.json
- log of the terminal output
- node version
- npm version
- on which system do you want to create installers (macOS, Linux or Windows).