set -e
mkdir -p src/beautify/esm
node ./build/update-jsbeautify.js
# upstream's script only warns if js-beautify cannot be read, so check the result
test -s src/beautify/beautify-css.js
test -s src/beautify/esm/beautify-css.js
tsc -p ./src
node ./build/copy-jsbeautify.js
tsc -p ./src/tsconfig.esm.json
