Use sed and a template for generating jquery.uls.data.js

Drop browserify.
This commit is contained in:
Santhosh Thottingal
2021-03-18 15:59:40 +05:30
committed by Niklas Laxström
parent 835947c36a
commit 990c5402f4
5 changed files with 22 additions and 30 deletions

View File

@@ -18,13 +18,9 @@ then (
git clone "$UPSTREAM" "$CLONEDIR"
fi
# This re-installs it every time, but guarantees we have the right version
echo "Installing browserify"
cd "$BASEDIR";
npm install --no-save browserify@v16.5.2
echo "Transforming language-data"
"$BASEDIR"/node_modules/browserify/bin/cmd.js "$CLONEDIR"/data/language-data.json -t "$BASEDIR"/scripts/transform.js -o "$DEST"/jquery.uls.data.js
JSONDATA="$CLONEDIR/data/language-data.json"
cat "$BASEDIR"/scripts/jquery.uls.data.template.js | sed -e "/languagedata/r $JSONDATA" -e "/languagedata/d" > "$DEST"/jquery.uls.data.js
echo "language-data written to $DEST/jquery.uls.data.js"