]> git.openstreetmap.org Git - nominatim-ui.git/blob - build.sh
detail page: add permalink, equivalent to https://github.com/openstreetmap/Nominatim...
[nominatim-ui.git] / build.sh
1 #!/bin/bash
2
3 mkdir -p dist/assets/
4 rsync --quiet --recursive src/assets/css/ dist/assets/css/
5 rsync --quiet --recursive src/assets/images/ dist/assets/images/
6
7 mkdir -p dist/assets/js/
8 cat src/assets/js/base.js src/assets/js/detailpage.js src/assets/js/searchpage.js > dist/assets/js/nominatim-ui.js
9
10 rsync --quiet --recursive src/vendor/js/* dist/assets/js/
11 rsync --quiet --recursive src/vendor/css/* dist/assets/css/
12 # rsync --quiet --recursive src/vendor/images/* dist/assets/images/
13 rsync --quiet --recursive src/templates dist/
14 # rsync --quiet --recursive src/partials dist/
15
16 rsync --quiet src/*.js dist/
17
18
19 cat src/layout.html | perl -pe'use File::Slurper qw(read_text); s/\@include\((.+?)\)/read_text($1)/eg' > /tmp/included.html
20
21 cat /tmp/included.html | perl -pe's/BODYID/search-page/g' > dist/search.html
22 cat /tmp/included.html | perl -pe's/BODYID/reverse-page/g' > dist/reverse.html
23 cat /tmp/included.html | perl -pe's/BODYID/details-page/g' > dist/details.html
24 cp src/index.html dist/