2018-08-02 15:30:33 +00:00
|
|
|
build:
|
|
|
|
./compile.sh
|
|
|
|
|
2018-08-22 13:35:32 +00:00
|
|
|
npm: npm-test npm-debug
|
2018-08-02 15:30:33 +00:00
|
|
|
mkdir -p ./npm-wasm/bin
|
|
|
|
mkdir -p ./npm-asmjs/bin
|
|
|
|
./compile.sh
|
2018-08-22 13:35:32 +00:00
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin
|
2018-08-02 15:30:33 +00:00
|
|
|
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin
|
2018-08-22 13:35:32 +00:00
|
|
|
./compile.sh asm.js
|
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/pathkit.js
|
|
|
|
cp ../../out/pathkit/pathkit.js.mem ./npm-asmjs/bin/pathkit.js.mem
|
2018-08-03 16:24:06 +00:00
|
|
|
|
2018-08-02 15:30:33 +00:00
|
|
|
publish:
|
|
|
|
cd npm-wasm; npm publish
|
2018-08-24 14:44:16 +00:00
|
|
|
cd npm-asmjs; npm publish
|
2018-08-02 15:30:33 +00:00
|
|
|
|
|
|
|
update-major:
|
|
|
|
cd npm-wasm; npm version major
|
2018-08-22 13:35:32 +00:00
|
|
|
cd ../npm-asmjs; npm version major
|
2018-08-02 15:30:33 +00:00
|
|
|
echo "Don't forget to publish."
|
|
|
|
|
|
|
|
update-minor:
|
|
|
|
cd npm-wasm; npm version minor
|
2018-08-24 14:44:16 +00:00
|
|
|
cd npm-asmjs; npm version minor
|
2018-08-02 15:30:33 +00:00
|
|
|
echo "Don't forget to publish."
|
|
|
|
|
|
|
|
update-patch:
|
|
|
|
cd npm-wasm; npm version patch
|
2018-08-24 14:44:16 +00:00
|
|
|
cd npm-asmjs; npm version patch
|
2018-08-02 15:30:33 +00:00
|
|
|
echo "Don't forget to publish."
|
|
|
|
|
2018-08-09 14:00:02 +00:00
|
|
|
# Build the library and run the tests. If developing locally, test-continuous is better
|
|
|
|
# suited for that, although if you make changes to the C++/WASM code, you will need
|
|
|
|
# to manually call make npm-test to re-build.
|
|
|
|
test: npm-test
|
|
|
|
npm install
|
|
|
|
npx karma start ./karma.conf.js --single-run
|
2018-08-22 13:35:32 +00:00
|
|
|
ASM_JS=1 npx karma start ./karma.conf.js --single-run
|
2018-08-09 14:00:02 +00:00
|
|
|
|
|
|
|
test-continuous:
|
|
|
|
echo "Assuming npm install has been run by user"
|
|
|
|
echo "Also assuming make npm-test has also been run by a user (if needed)"
|
|
|
|
npx karma start ./karma.conf.js --no-single-run --watch-poll
|
|
|
|
|
2018-08-22 13:35:32 +00:00
|
|
|
test-continuous-asmjs:
|
|
|
|
echo "Assuming npm install has been run by user"
|
|
|
|
echo "Also assuming make npm-test has also been run by a user (if needed)"
|
|
|
|
ASM_JS=1 npx karma start ./karma.conf.js --no-single-run --watch-poll
|
|
|
|
|
2018-08-09 14:00:02 +00:00
|
|
|
# Build the library and run the tests using the docker image. If developing locally,
|
|
|
|
# test-docker-continuous is better, although if you make changes to the C++/WASM code,
|
|
|
|
# you will need to manually call make npm-test to re-build.
|
2018-10-02 13:02:18 +00:00
|
|
|
test-docker:
|
|
|
|
mkdir -p ./npm-wasm/bin/test
|
|
|
|
mkdir -p ./npm-asmjs/bin/test
|
|
|
|
mkdir -p $$SKIA_ROOT/out/dockerbuild
|
|
|
|
|
|
|
|
docker run --rm -v $$SKIA_ROOT:/SRC -v $$SKIA_ROOT/out/dockerbuild:/OUT \
|
2019-10-09 14:46:14 +00:00
|
|
|
gcr.io/skia-public/emsdk-base:prod /SRC/infra/pathkit/build_pathkit.sh
|
2018-10-02 13:02:18 +00:00
|
|
|
cp ../../out/dockerbuild/pathkit.js ./npm-wasm/bin/test/pathkit.js
|
|
|
|
cp ../../out/dockerbuild/pathkit.wasm ./npm-wasm/bin/test/pathkit.wasm
|
|
|
|
|
|
|
|
docker run --rm -v $$SKIA_ROOT:/SRC -v $$SKIA_ROOT/out/dockerbuild:/OUT \
|
2019-10-09 14:46:14 +00:00
|
|
|
gcr.io/skia-public/emsdk-base:prod /SRC/infra/pathkit/build_pathkit.sh asm.js
|
2018-10-02 13:02:18 +00:00
|
|
|
cp ../../out/dockerbuild/pathkit.js ./npm-asmjs/bin/test/pathkit.js
|
|
|
|
cp ../../out/dockerbuild/pathkit.js.mem ./npm-asmjs/bin/test/pathkit.js.mem
|
|
|
|
|
2019-03-12 18:06:19 +00:00
|
|
|
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
2018-08-31 14:03:23 +00:00
|
|
|
karma start /SRC/modules/pathkit/karma.conf.js --single-run
|
2019-03-12 18:06:19 +00:00
|
|
|
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC -e ASM_JS=1 gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
2018-08-31 14:03:23 +00:00
|
|
|
karma start /SRC/modules/pathkit/karma.conf.js --single-run
|
2018-08-09 14:00:02 +00:00
|
|
|
|
|
|
|
test-docker-continuous:
|
|
|
|
echo "Assuming make npm-test has also been run by a user (if needed)"
|
2019-03-12 18:06:19 +00:00
|
|
|
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
2018-08-31 14:03:23 +00:00
|
|
|
karma start /SRC/modules/pathkit/karma.conf.js --no-single-run
|
2018-08-22 13:35:32 +00:00
|
|
|
|
|
|
|
test-docker-continuous-asmjs:
|
|
|
|
echo "Assuming make npm-test has also been run by a user (if needed)"
|
2019-03-12 18:06:19 +00:00
|
|
|
docker run --shm-size=2gb -v $$SKIA_ROOT:/SRC -e ASM_JS=1 gcr.io/skia-public/karma-chrome-tests:72.0.3626.121_v1 \
|
2018-08-31 14:03:23 +00:00
|
|
|
karma start /SRC/modules/pathkit/karma.conf.js --no-single-run
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
|
|
|
|
npm-test:
|
|
|
|
# This compile time is typically faster than release and good for use with
|
|
|
|
# local-example-test
|
|
|
|
mkdir -p ./npm-wasm/bin/test
|
|
|
|
mkdir -p ./npm-asmjs/bin/test
|
|
|
|
./compile.sh test
|
2018-08-22 13:35:32 +00:00
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin/test/pathkit.js
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin/test/pathkit.wasm
|
2018-08-22 13:35:32 +00:00
|
|
|
./compile.sh asm.js test
|
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/test/pathkit.js
|
|
|
|
cp ../../out/pathkit/pathkit.js.mem ./npm-asmjs/bin/test/pathkit.js.mem
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
|
|
|
|
npm-debug:
|
|
|
|
# This compile time is typically faster than release and good for use with
|
|
|
|
# local-example-test
|
|
|
|
mkdir -p ./npm-wasm/bin/debug
|
|
|
|
mkdir -p ./npm-asmjs/bin/debug
|
|
|
|
./compile.sh debug
|
2018-08-22 13:35:32 +00:00
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-wasm/bin/debug/pathkit.js
|
|
|
|
cp ../../out/pathkit/pathkit.wasm ./npm-wasm/bin/debug/pathkit.wasm
|
2018-10-02 13:02:18 +00:00
|
|
|
cp ../../out/pathkit/pathkit.wasm.map ./npm-wasm/bin/debug/pathkit.wasm.map
|
2018-08-22 13:35:32 +00:00
|
|
|
./compile.sh asm.js debug
|
|
|
|
cp ../../out/pathkit/pathkit.js ./npm-asmjs/bin/debug/pathkit.js
|
|
|
|
cp ../../out/pathkit/pathkit.js.map ./npm-asmjs/bin/debug/pathkit.js.map
|
2018-08-02 15:30:33 +00:00
|
|
|
|
|
|
|
example:
|
2018-08-31 14:45:18 +00:00
|
|
|
npm install pathkit-asmjs pathkit-wasm
|
2018-08-02 15:30:33 +00:00
|
|
|
echo "Go check out localhost:8000/npm-wasm/example.html"
|
2018-08-03 16:24:06 +00:00
|
|
|
python serve.py
|
|
|
|
|
|
|
|
local-example:
|
2018-08-31 14:45:18 +00:00
|
|
|
rm -rf node_modules/pathkit-wasm
|
|
|
|
rm -rf node_modules/pathkit-asmjs
|
2018-08-03 16:24:06 +00:00
|
|
|
mkdir -p node_modules
|
2018-08-31 14:45:18 +00:00
|
|
|
ln -s -T ../npm-wasm node_modules/pathkit-wasm
|
|
|
|
ln -s -T ../npm-asmjs node_modules/pathkit-asmjs
|
2018-08-22 13:35:32 +00:00
|
|
|
echo "Go check out http://localhost:8000/npm-wasm/example.html"
|
|
|
|
echo "or http://localhost:8000/npm-asmjs/example.html"
|
2018-08-03 16:24:06 +00:00
|
|
|
python serve.py
|
|
|
|
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
local-example-test:
|
2018-08-31 14:45:18 +00:00
|
|
|
rm -rf node_modules/pathkit-wasm
|
|
|
|
rm -rf node_modules/pathkit-asmjs
|
|
|
|
mkdir -p node_modules/pathkit-wasm
|
|
|
|
mkdir -p node_modules/pathkit-asmjs
|
|
|
|
ln -s -T ../../npm-wasm/bin/test node_modules/pathkit-wasm/bin
|
|
|
|
ln -s -T ../../npm-asmjs/bin/test node_modules/pathkit-asmjs/bin
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
echo "Go check out localhost:8000/npm-wasm/example.html"
|
2018-08-22 13:35:32 +00:00
|
|
|
echo "or http://localhost:8000/npm-asmjs/example.html"
|
[PathKit] Add more Path2D functionality and move some methods to be members
Adds arc, arcTo, rect and Path2D names for quadTo, cubicTo, close.
Adds conic verb support (approximated with 2 quads).
Breaking changes:
Some functions have been moved to be member functions:
PathKit.Simplify(path) -> path.simplify()
PathKit.ToCanvas(path, ctx) -> path.toCanvas(ctx)
PathKit.ToSVGString(path) -> path.toSVGString()
PathKit.ToPath2D(path) -> path.toPath2D()
PathKit.ToCmds(path) -> path.toCmds()
PathKit.ResolveBuilder(builder) -> builder.resolve()
PathKit.GetBoundaryPathFromRegion(region) -> region.getBoundaryPath()
Pathkit.ApplyPathOp(pathOne, pathTwo, op) still exists, but there's
now also pathOne.op(pathTwo, op) for cases when that's easier.
As per custom with version 0.x.y projects, I'm bumping the
minor version (in npm) for these breaking changes instead of the
major version (which will happen when we are version >= 1.0.0).
This also has some small improvements to the output code size.
The biggest jump was from enabling the closure compiler on the
helper JS, which trimmed it down by about 40%. Using the closure
compiler requires the JRE on the bots, which prompted the emsdk-base
image change.
Bug: skia:8216
Change-Id: I40902d23380093c34d1679df0255bcb0eaa77b01
Reviewed-on: https://skia-review.googlesource.com/145420
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-08-06 18:49:39 +00:00
|
|
|
python serve.py
|
|
|
|
|
2018-08-03 16:24:06 +00:00
|
|
|
local-example-debug:
|
2018-08-31 14:45:18 +00:00
|
|
|
rm -rf node_modules/pathkit-wasm
|
|
|
|
rm -rf node_modules/pathkit-asmjs
|
|
|
|
mkdir -p node_modules/pathkit-wasm
|
|
|
|
mkdir -p node_modules/pathkit-asmjs
|
|
|
|
ln -s -T ../../npm-wasm/bin/debug node_modules/pathkit-wasm/bin
|
|
|
|
ln -s -T ../../npm-asmjs/bin/debug node_modules/pathkit-asmjs/bin
|
2018-08-03 16:24:06 +00:00
|
|
|
echo "Go check out localhost:8000/npm-wasm/example.html"
|
2018-08-22 13:35:32 +00:00
|
|
|
echo "or http://localhost:8000/npm-asmjs/example.html"
|
2018-09-07 18:00:41 +00:00
|
|
|
python serve.py
|
2018-11-06 12:49:40 +00:00
|
|
|
|