The build scripts are designed to run on unix platform (linux, mac, bsd, etc), if you on windows, try to install cygwin.
Prerequisites:
- UNIX-like OS
- Installed make
- Installed docker
Instructions:
- Create
.envfile. You may copy file.env.configand configure it with your options - To build all code, create packages, and check it with linter just run
make build- If you build from a platform other than amd64, you may have problems with build a third party code. To resolve a problem, you have to build code in environment that are compatible with amd64. You may enable emulation, if you use docker - set variable
export DOCKER_DEFAULT_PLATFORM=linux/amd64or provide optionplatform: linux/amd64to adocker-compose.ymlfile
- If you build from a platform other than amd64, you may have problems with build a third party code. To resolve a problem, you have to build code in environment that are compatible with amd64. You may enable emulation, if you use docker - set variable
- To make build only for specific platform, you may run
makewith specific target likebuildFirefox,buildChromium, etc (seemakefilefor details)- You must build a third party code with
make buildThirdpartybefore run specific target. Example:make prepare buildThirdparty buildFirefox
- You must build a third party code with
- Artifacts is placed in
builddirectory
Available platforms:
- firefox
- chrome
- chromium: special build with auto updates not from google store
You may run development mode with make dev.
If you change a theme tokens, you also have to compile a theme files: npm run build:tokens
To debug on android, see instructions.
To make a custom translator, see translator API.
When you change code that touch any user data and interact with browser storages (localStorage, indexedDB, browser.storage, etc) or some external API, you must to add or update tests for it.
The common rule is any code that just transform data should be tested.
You may a not add tests for UI, but should add tests for data.
Migrations must have app version.