X-Git-Url: https://git.openstreetmap.org./nominatim-ui.git/blobdiff_plain/b687c8f1cbd62f88c61db9b209bc8f7145203d3c..88c1b10321b51b6583783e21d266119dd4e04525:/build.sh?ds=sidebyside diff --git a/build.sh b/build.sh index 84d0050..973ccbd 100755 --- a/build.sh +++ b/build.sh @@ -1,72 +1,69 @@ #!/bin/bash mkdir -p dist/assets/ -rsync --quiet --recursive src/assets/css/ dist/assets/css/ +rsync --quiet --recursive src/assets/css/ dist/assets/css/ rsync --quiet --recursive src/assets/images/ dist/assets/images/ 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 > dist/assets/js/nominatim-ui.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/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/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.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/leaflet-minimap/dist/images/* dist/assets/css/images/ -rsync --quiet node_modules/bootstrap/dist/js/bootstrap.min.js dist/assets/js/ -rsync --quiet node_modules/bootstrap/dist/css/bootstrap.min.css* dist/assets/css/ -rsync --quiet node_modules/bootstrap/dist/css/bootstrap-theme.min.css* dist/assets/css/ +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/templates/*.hbs dist/ +rsync --quiet node_modules/@ungap/url-search-params/min.js dist/assets/js/url-search-params.js rsync --quiet src/*.js dist/ -# replaced the Perl one-liner with shell logic to remove the dependency -# 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 '' | sed -e 's/BODYID/search-page/' > dist/search.html -echo '' >> dist/search.html -echo '' >> dist/search.html -echo '' >> dist/search.html - -cat src/layout.html | grep -v '' | grep -v '' | sed -e 's/BODYID/reverse-page/' > dist/reverse.html -echo '' >> dist/reverse.html -echo '' >> dist/reverse.html -echo '' >> dist/reverse.html - -cat src/layout.html | grep -v '' | grep -v '' | sed -e 's/BODYID/details-page/' > dist/details.html -echo '' >> dist/details.html -echo '' >> dist/details.html -echo '' >> dist/details.html -echo '' >> dist/details.html - -cat src/layout.html | grep -v '' | grep -v '' | sed -e 's/BODYID/deletable-page/' > dist/deletable.html -echo '' >> dist/deletable.html -echo '' >> dist/deletable.html -echo '' >> dist/deletable.html - -cat src/layout.html | grep -v '' | grep -v '' | sed -e 's/BODYID/polygons-page/' > dist/polygons.html -echo '' >> dist/polygons.html -echo '' >> dist/polygons.html -echo '' >> dist/polygons.html +{ + cat src/layout.html | grep -v '' | grep -v '' + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + + echo '' + echo '' +} > dist/search.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/