Skip to content

Commit

Permalink
Change build-wasm script
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Mar 7, 2024
1 parent 8ecacac commit 211fe1d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions script/build-wasm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ set -e

web_dir=lib/binding_web
emscripten_flags="-O3"
minify_js=1
# NOTE: Changed by Pulsar to emit unminified code.
minify_js=0
force_docker=0
emscripen_version=$(cat "$(dirname "$0")"/../cli/loader/emscripten-version)

Expand Down Expand Up @@ -130,7 +131,9 @@ if [[ "$minify_js" == "1" ]]; then
-- target/scratch/tree-sitter.js \
> $web_dir/tree-sitter.js
else
cp target/scratch/tree-sitter.js $web_dir/tree-sitter.js
# NOTE: Changed by Pulsar to emit code that is easier to debug locally.
${web_dir}/node_modules/.bin/js-beautify target/scratch/tree-sitter.js > $web_dir/tree-sitter.js
# cp target/scratch/tree-sitter.js $web_dir/tree-sitter.js
fi

mv target/scratch/tree-sitter.wasm $web_dir/tree-sitter.wasm

0 comments on commit 211fe1d

Please sign in to comment.