From 7f9cc4da0204e4e1a93fd7bf585834769ccad685 Mon Sep 17 00:00:00 2001 From: Ilia Date: Sat, 16 Apr 2022 20:25:29 +0300 Subject: [PATCH] build: add build system and try to fix path if command not found --- mandelbrot.sublime-project | 6 ++++++ scripts/build/wasm.sh | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/mandelbrot.sublime-project b/mandelbrot.sublime-project index 24db303..f47dd4e 100644 --- a/mandelbrot.sublime-project +++ b/mandelbrot.sublime-project @@ -4,5 +4,11 @@ { "path": "." } + ], + "build_systems": [ + { + "name": "Build wasm", + "shell_cmd": "yarn build:wasm" + } ] } diff --git a/scripts/build/wasm.sh b/scripts/build/wasm.sh index 15e9ff0..0e7f21a 100755 --- a/scripts/build/wasm.sh +++ b/scripts/build/wasm.sh @@ -1,4 +1,9 @@ #!/bin/bash cd wasm -wasm-pack build --release --out-dir=../src/wasm + +build () { + wasm-pack build --release --out-dir=../src/wasm +} + +build || export PATH=$PATH:$HOME/.cargo/bin && build