X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/f1f689cc389aeddef7694c7584224ea5c2b30f5a..a410d476a22053a8e7ffda483efbb1959be9d713:/build.sh diff --git a/build.sh b/build.sh index f8df67a..973ccbd 100755 --- a/build.sh +++ b/build.sh @@ -1,17 +1,69 @@ #!/bin/bash -# mkdir dist/ +mkdir -p dist/assets/ +rsync --quiet --recursive src/assets/css/ dist/assets/css/ +rsync --quiet --recursive src/assets/images/ dist/assets/images/ -rsync --quiet --recursive src/assets dist/ -rsync --quiet --recursive src/templates dist/ -# rsync --quiet --recursive src/partials dist/ +mkdir -p dist/assets/js/ +cat src/assets/js/base.js \ + src/assets/js/detailpage.js \ + src/assets/js/searchpage.js \ + src/assets/js/deletable.js \ + src/assets/js/polygons.js \ + src/assets/js/controller.js > dist/assets/js/nominatim-ui.js + +rsync --quiet node_modules/jquery/dist/jquery.min.js dist/assets/js/ +rsync --quiet node_modules/leaflet/dist/leaflet.js dist/assets/js/ +rsync --quiet node_modules/leaflet/dist/leaflet.js.map dist/assets/js/ +rsync --quiet node_modules/leaflet/dist/leaflet.css dist/assets/css/ +rsync --quiet node_modules/leaflet/dist/images/* dist/assets/css/images/ + +rsync --quiet node_modules/leaflet-minimap/dist/Control.MiniMap.min.js dist/assets/js/ +rsync --quiet node_modules/leaflet-minimap/dist/Control.MiniMap.min.css dist/assets/css/ +rsync --quiet node_modules/leaflet-minimap/dist/images/* dist/assets/css/images/ + +rsync --quiet node_modules/bootstrap/dist/js/bootstrap.bundle.min.js* dist/assets/js/ +rsync --quiet node_modules/bootstrap/dist/css/bootstrap.min.css dist/assets/css/ + +rsync --quiet node_modules/handlebars/dist/handlebars.min.js dist/assets/js/ +rsync --quiet node_modules/@ungap/url-search-params/min.js dist/assets/js/url-search-params.js rsync --quiet src/*.js dist/ -cat src/layout.html | perl -pe'use File::Slurper qw(read_text); s/\@include\((.+?)\)/read_text($1)/eg' > /tmp/included.html +{ + cat src/layout.html | grep -v '' | grep -v '' + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + echo '' +} > dist/search.html -cat /tmp/included.html | perl -pe's/BODYID/search-page/g' > dist/search.html -cat /tmp/included.html | perl -pe's/BODYID/reverse-page/g' > dist/reverse.html -cat /tmp/included.html | perl -pe's/BODYID/details-page/g' > dist/details.html +cp dist/search.html dist/reverse.html +cp dist/search.html dist/details.html +cp dist/search.html dist/deletable.html +cp dist/search.html dist/polygons.html +cp src/index.html dist/