-
Notifications
You must be signed in to change notification settings - Fork 9
/
README.developer
45 lines (30 loc) · 1.6 KB
/
README.developer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Developer instructions
## Unit testing
Node.js and jest is used for testing.
-- run `npm install` in the ext/webextension folder (where packages.json resides).
Afterwards `npm run test` to run all tests.
Test coverage is not the greatest at the moment.
Also some (most) code is rather unaccessible to testing (thanks to being hidden in iife's)
but we'll get there with time.. And some is better than nothing :)
### other useful node commands
all run in the ext/webextension folder
```
npx ncu --upgrade ; check for package upgrades
npx eslint . ; run linter
```
## Building the libscrypt dependency
build docker container in libscrypt/docker:
`cd libscrypt; cat docker/Dockerfile | docker build -t mpw-emcc:1.35.10 -`
use the docker container to build libscrypt as a asm.js module:
`docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) mpw-emcc:1.35.10 make`
copy resulting scrypt-asm.js to /ext/webextension/src/lib/scrypt-asm.js
(you could also just copy the required scrypt-asm.js file from a release)
## Building icons
run `makeicons.sh` in the gfx folder. The script needs imagemagik and will copy all icons to the correct location (/ext/webextension/icons)
(again you could just extract the files from a release)
## Building Public Suffix List
`make ../ext/webextension/src/lib/psllookup.json.gz` in the publicsuffixlist folder.
## Browsers
The source supports both Chromium (Chrome, Edge, Vivaldi(apparently)) and Firefox, with separate manifest.json.
It's suggested to symlink `src` into the chromeext folder for easy parallell testing.
Another solution is to copy the one you want into ext/webextension.