Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
npm-asmjs/ | H | 25-Apr-2025 | - | 588 | 477 | |
npm-wasm/ | H | 25-Apr-2025 | - | 588 | 477 | |
perf/ | H | 25-Apr-2025 | - | 705 | 568 | |
tests/ | H | 25-Apr-2025 | - | 30,513 | 30,286 | |
.gitignore | H A D | 25-Apr-2025 | 191 | 8 | 8 | |
BUILD.bazel | H A D | 25-Apr-2025 | 3.1 KiB | 120 | 105 | |
CHANGELOG.md | H A D | 25-Apr-2025 | 1.3 KiB | 51 | 33 | |
Makefile | H A D | 25-Apr-2025 | 2.8 KiB | 82 | 70 | |
README.md | H A D | 25-Apr-2025 | 1.6 KiB | 86 | 61 | |
chaining.js | H A D | 25-Apr-2025 | 6.5 KiB | 202 | 146 | |
compile.sh | H A D | 25-Apr-2025 | 3.5 KiB | 124 | 87 | |
externs.js | H A D | 25-Apr-2025 | 4.3 KiB | 115 | 77 | |
helper.js | H A D | 25-Apr-2025 | 3.7 KiB | 109 | 60 | |
karma.bench.conf.js | H A D | 25-Apr-2025 | 2.9 KiB | 97 | 55 | |
karma.conf.js | H A D | 25-Apr-2025 | 3 KiB | 99 | 57 | |
package-lock.json | H A D | 25-Apr-2025 | 66.8 KiB | 1,729 | 1,728 | |
package.json | H A D | 25-Apr-2025 | 503 | 23 | 22 | |
pathkit_wasm_bindings.cpp | H A D | 25-Apr-2025 | 24.1 KiB | 652 | 445 |
README.md
1PathKit WASM API 2================ 3 4The [PathKit](https://skia.org/docs/user/modules/pathkit/) library lets you use 5Skia's feature-rich PathOps API in the browser. 6 7Compiling the source 8-------------------- 9 10### Compiling with GN 11 12Get a compiled [Enscriptem SDK](https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html) 13in your path. This is easiest done by running `//tools/git-sync-deps` which 14downloads and then runs `//bin/activate-emsdk`. 15 16To compile a production WASM build to `//out/pathkit`: 17 18```sh 19./compile.sh 20``` 21 22Add `--help` for more options. 23 24### Compiling with Bazel 25 26To compile a production WASM build to `//bazel-bin/modules/pathkit/pathkit`: 27 28```sh 29bazelisk build //modules/pathkit:pathkit --config=ck_full_webgl2_release 30``` 31 32A debug build: 33 34```sh 35bazelisk build //modules/pathkit:pathkit --config=ck_full_webgl2_debug 36``` 37 38Testing 39------- 40 41### Running example page locally: 42 43```sh 44# First build PathKit 45make release 46# Then run a local test server 47make local-example 48``` 49 50Then follow messages to navigate the browser to the example page. 51 52### Automated tests 53 54**Testing the GN build** 55 56```sh 57make release 58make npm 59npm ci 60make test-continuous 61``` 62 63**Testing the Bazel build** 64 65```sh 66make debug-bazel 67make npm-bazel 68npm ci 69make test-continuous 70``` 71 72Deploying to npm 73---------------- 74 75NOTE: The deployment steps use the GN build. 76 77```sh 78# Build the release version for both asmjs and WASM 79# These binaries will be placed in the proper places of npm-*/bin 80make npm 81 82# In each npm- subdirectory, run: 83npm version minor (or patch or major) 84npm login --registry https://wombat-dressing-room.appspot.com 85npm publish 86```