]> git.openstreetmap.org Git - nominatim-ui.git/blob - build.sh
Add interface for setting advanced search options (#38)
[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       \
9     src/assets/js/detailpage.js \
10     src/assets/js/searchpage.js \
11     src/assets/js/deletable.js  \
12     src/assets/js/polygons.js   \
13     src/assets/js/controller.js > dist/assets/js/nominatim-ui.js
14
15 rsync --quiet node_modules/jquery/dist/jquery.min.js   dist/assets/js/
16 rsync --quiet node_modules/leaflet/dist/leaflet.js     dist/assets/js/
17 rsync --quiet node_modules/leaflet/dist/leaflet.js.map dist/assets/js/
18 rsync --quiet node_modules/leaflet/dist/leaflet.css    dist/assets/css/
19 rsync --quiet node_modules/leaflet/dist/images/*       dist/assets/css/images/
20
21 rsync --quiet node_modules/leaflet-minimap/dist/Control.MiniMap.min.js  dist/assets/js/
22 rsync --quiet node_modules/leaflet-minimap/dist/Control.MiniMap.min.css dist/assets/css/
23 rsync --quiet node_modules/leaflet-minimap/dist/images/*                dist/assets/css/images/
24
25 rsync --quiet node_modules/bootstrap/dist/js/bootstrap.bundle.min.js* dist/assets/js/
26 rsync --quiet node_modules/bootstrap/dist/css/bootstrap.min.css       dist/assets/css/
27
28 rsync --quiet node_modules/handlebars/dist/handlebars.min.js dist/assets/js/
29 rsync --quiet node_modules/@ungap/url-search-params/min.js   dist/assets/js/url-search-params.js
30
31 rsync --quiet src/*.js dist/
32
33
34 {
35   cat src/layout.html | grep -v '</body>' | grep -v '</html>'
36   echo '<script id="searchpage-template" type="text/x-handlebars-template">'
37   cat src/templates/searchpage.hbs
38   echo '</script>'
39
40   echo '<script id="reversepage-template" type="text/x-handlebars-template">'
41   cat src/templates/reversepage.hbs
42   echo '</script>'
43
44   echo '<script id="detailspage-template" type="text/x-handlebars-template">'
45   cat src/templates/detailspage.hbs
46   echo '</script>'
47
48   echo '<script id="detailspage-index-template" type="text/x-handlebars-template">'
49   cat src/templates/detailspage-index.hbs
50   echo '</script>'
51
52   echo '<script id="deletable-template" type="text/x-handlebars-template">'
53   cat src/templates/deletable.hbs
54   echo '</script>'
55
56   echo '<script id="polygons-template" type="text/x-handlebars-template">'
57   cat src/templates/polygons.hbs
58   echo '</script>'
59
60   echo '</body>'
61   echo '</html>'
62 } > dist/search.html
63
64 cp dist/search.html dist/reverse.html
65 cp dist/search.html dist/details.html
66 cp dist/search.html dist/deletable.html
67 cp dist/search.html dist/polygons.html
68
69 cp src/index.html dist/