e1b36fe3e5
- Remove some old API with VerbArgs that we didn't really like. - move from experimental/wasm -> experimental/pathkit and rename wasm_main.cpp to pathkit_wasm_bindings (more descriptive). - Make compile.sh nicer to use (with some form of command line args). - Use MODULARIZE=1 to make this play nicer with other WASM libraries and easier to import. - Add seperate ToCanvas() API - Move Region stuff behind the PATHKIT_TESTING flag (saves 100k on binary size). - Add npm package for wasm version. asm.js version should also be supported for older browsers. - Remove shell.html, which was largely too complicated. Replace it with example.html, which is more succinct and demos the more relevant APIs. See https://www.npmjs.com/package/experimental-pathkit-wasm Bug: skia:8216 Change-Id: I15f14dd8acd77331729998ae3e30d73e4b006761 Reviewed-on: https://skia-review.googlesource.com/144790 Reviewed-by: Joe Gregorio <jcgregorio@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Kevin Lubick <kjlubick@google.com>
41 lines
844 B
Makefile
41 lines
844 B
Makefile
build:
|
|
./compile.sh
|
|
|
|
npm:
|
|
mkdir -p ./npm-wasm/bin
|
|
mkdir -p ./npm-asmjs/bin
|
|
./compile.sh
|
|
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin
|
|
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin
|
|
#./compile.sh asm.js TODO
|
|
|
|
publish:
|
|
cd npm-wasm; npm publish
|
|
|
|
update-major:
|
|
cd npm-wasm; npm version major
|
|
echo "Don't forget to publish."
|
|
|
|
update-minor:
|
|
cd npm-wasm; npm version minor
|
|
echo "Don't forget to publish."
|
|
|
|
update-patch:
|
|
cd npm-wasm; npm version patch
|
|
echo "Don't forget to publish."
|
|
|
|
dev:
|
|
./compile.sh dev
|
|
|
|
dev-npm:
|
|
mkdir -p ./npm-wasm/bin
|
|
mkdir -p ./npm-asmjs/bin
|
|
./compile.sh dev
|
|
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin
|
|
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin
|
|
#./compile.sh asm.js TODO
|
|
|
|
example:
|
|
npm install experimental-pathkit-wasm
|
|
echo "Go check out localhost:8000/npm-wasm/example.html"
|
|
python serve.py
|