1clean: 2 rm -rf ../../out/canvaskit_wasm 3 rm -rf ./npm_build/bin 4 $(MAKE) release 5 6release: 7 # Does an incremental build where possible. 8 ./compile.sh 9 mkdir -p ./npm_build/bin 10 cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin 11 cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin 12 13release_cpu: 14 # Does an incremental build where possible. 15 ./compile.sh cpu_only 16 mkdir -p ./npm_build/bin 17 cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin 18 cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin 19 20release_viewer: 21 # Does an incremental build where possible. 22 ./compile.sh viewer 23 mkdir -p ./npm_build/bin 24 cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin 25 cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin 26 27debug: 28 # Does an incremental build where possible. 29 ./compile.sh debug 30 mkdir -p ./npm_build/bin 31 cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin 32 cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin 33 #cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin 34 35debug_cpu: 36 # Does an incremental build where possible. 37 ./compile.sh debug cpu_only 38 mkdir -p ./npm_build/bin 39 cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin 40 cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin 41 #cp ../../out/canvaskit_wasm_debug/canvaskit.wasm.map ./npm_build/bin 42 43experimental_simd: 44 # Does an incremental build where possible. 45 ./compile.sh simd 46 mkdir -p ./npm_build/bin 47 cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.js ./npm_build/bin 48 cp ../../out/canvaskit_wasm_experimental_simd/canvaskit.wasm ./npm_build/bin 49 50debug_viewer: 51 # Does an incremental build where possible. 52 ./compile.sh debug viewer 53 mkdir -p ./npm_build/bin 54 cp ../../out/canvaskit_wasm_debug/canvaskit.js ./npm_build/bin 55 cp ../../out/canvaskit_wasm_debug/canvaskit.wasm ./npm_build/bin 56 57profile: 58 ./compile.sh profiling 59 mkdir -p ./npm_build/bin 60 cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin 61 cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin 62 63npm: 64 rm -rf ./npm_build/bin 65 mkdir -p ./npm_build/bin 66 cp ./CHANGELOG.md ./npm_build/ 67 68 mkdir -p ./npm_build/bin/full 69 ./compile.sh release 70 cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin/full 71 cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin/full 72 73 # These features are turned off to keep code size smaller for the 74 # general use case. 75 ./compile.sh release no_skottie no_particles no_rt_shader no_alias_font no_effects_deserialization 76 cp ../../out/canvaskit_wasm/canvaskit.js ./npm_build/bin 77 cp ../../out/canvaskit_wasm/canvaskit.wasm ./npm_build/bin 78 79 mkdir -p ./npm_build/bin/profiling 80 ./compile.sh profiling 81 cp ../../out/canvaskit_wasm_profile/canvaskit.js ./npm_build/bin/profiling 82 cp ../../out/canvaskit_wasm_profile/canvaskit.wasm ./npm_build/bin/profiling 83 84gm_tests_debug: 85 ./compile_gm.sh debug 86 mkdir -p ./out 87 cp ../../out/wasm_gm_tests_debug/wasm_gm_tests.js ./out 88 cp ../../out/wasm_gm_tests_debug/wasm_gm_tests.wasm ./out 89 90gm_tests: 91 ./compile_gm.sh 92 mkdir -p ./out 93 cp ../../out/wasm_gm_tests/wasm_gm_tests.js ./out 94 cp ../../out/wasm_gm_tests/wasm_gm_tests.wasm ./out 95 96local-example: 97 rm -rf node_modules/canvaskit 98 mkdir -p node_modules 99 ln -s ../npm_build node_modules/canvaskit 100 echo "Go check out http://localhost:8000/npm_build/example.html" 101 python2 serve.py 102 103test-continuous: 104 echo "Assuming npm ci has been run by user" 105 echo "Also assuming make debug or release has also been run by a user (if needed)" 106 npx karma start ./karma.conf.js --no-single-run --watch-poll 107 108test-continuous-headless: 109 npx karma start ./karma.conf.js --no-single-run --watch-poll --headless 110 111node-example: 112 node ./npm_build/node.example.js --expose-wasm 113 114docker-compile: 115 mkdir -p ${SKIA_ROOT}/out/canvaskit_wasm_docker 116 docker run --rm --volume ${SKIA_ROOT}:/SRC \ 117 --volume ${SKIA_ROOT}/out/canvaskit_wasm_docker:/OUT \ 118 gcr.io/skia-public/canvaskit-emsdk:2.0.0_v1 \ 119 /SRC/infra/canvaskit/build_canvaskit.sh 120 121typecheck: 122 echo "Make sure you've run cd npm_build && npm ci recently" 123 cd npm_build && npm run dtslint 124