1
0
Fork 0
mirror of https://github.com/Luzifer/mapshare.git synced 2024-11-14 15:52:42 +00:00
mapshare/ci/bundle_js.sh

42 lines
989 B
Bash
Raw Normal View History

2020-01-06 20:56:17 +00:00
#!/bin/bash
set -euxo pipefail
css_deps=(
# Must-have order
npm/bootstrap@4/dist/css/bootstrap.min.css
npm/bootswatch@4/dist/darkly/bootstrap.min.css
npm/bootstrap-vue@2/dist/bootstrap-vue.min.css
# Other packages
2020-01-06 23:19:11 +00:00
npm/leaflet@1.6.0/dist/leaflet.min.css
2020-01-06 20:56:17 +00:00
)
js_deps=(
# Must-have order
npm/vue@2/dist/vue.min.js
npm/bootstrap-vue@2/dist/bootstrap-vue.min.js
npm/vue-i18n@8.15.3/dist/vue-i18n.min.js
2020-01-06 20:56:17 +00:00
# Other packages
npm/axios@0.19.0/dist/axios.min.js
2020-01-06 23:19:11 +00:00
npm/leaflet@1.6.0/dist/leaflet.min.js
2020-01-06 20:56:17 +00:00
npm/moment@2.24.0/min/moment.min.js
)
2020-01-06 23:19:11 +00:00
leaflet_images=(
marker-icon.png
marker-icon-2x.png
marker-shadow.png
)
rm -rf frontend/leaflet
mkdir -p frontend/leaflet
for img in "${leaflet_images[@]}"; do
curl -sSfLo "frontend/leaflet/${img}" "https://cdn.jsdelivr.net/npm/leaflet@1.5.1/dist/images/${img}"
done
2020-01-06 20:56:17 +00:00
IFS=','
curl -sSfLo frontend/combine.js "https://cdn.jsdelivr.net/combine/${js_deps[*]}"
curl -sSfLo frontend/combine.css "https://cdn.jsdelivr.net/combine/${css_deps[*]}"