archematics/tools/makePlugin.bash
Glen Whitney fff75f67e3 chore: update and prune embedded GeoGebra (#41)
Reviewed-on: #41
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-10-08 22:15:11 +00:00

25 lines
884 B
Bash

# Takes one parameter, the destination directory
mkdir -p $1/deps/x_ite/assets/images
mkdir -p $1/deps/x_ite/assets/components
cp etc/manifest.json etc/options.html $1
cp etc/deps/x_ite/x_ite.css $1/deps/x_ite
cp etc/deps/x_ite/assets/images/logo.128.png $1/deps/x_ite/assets/images
cp etc/deps/x_ite/x_ite.mjs $1/deps/x_ite
cp etc/deps/x_ite/assets/components/* $1/deps/x_ite/assets/components
geoFiles=($(grep deps/GeoGebra etc/manifest.json))
for spec in "${geoFiles[@]}"
do
quotspec=${spec%,}
trimRspec="${quotspec%\"}"
trimspec="${trimRspec#\"}"
dest=${trimspec%/*}
mkdir -p $1/$dest
cp -r etc/$trimspec $1/$dest
done
npx rollup public/js/giveAwrl.js --dir extension
npx rollup public/js/adapptlet.js --file extension/adapptlet.js
npx rollup public/js/adapptext.js --file extension/adapptext.js
cp public/js/options.js public/js/adapptypes.js extension