Skip to content

Commit

Permalink
improve lang-compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Dec 2, 2024
1 parent 546a08e commit 997e5a2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions script/lang-compile
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/usr/bin/env bash
set -e

for file in "lang/"*".json"; do
shopt -s nullglob

rm -rf lang/compiled
mkdir -p lang/compiled

for file in "lang/"*.json; do
base_name=$(basename "$file")
new_file="lang/compiled/${base_name}"

echo "Compiling $file to $new_file with formatjs"
formatjs compile $file --ast --format simple --skip-errors --out-file "${new_file}"
formatjs compile $file --ast --format simple --skip-errors --out-file "${new_file}" &
done

wait

0 comments on commit 997e5a2

Please sign in to comment.