summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2018-05-16 17:30:42 +0200
committerJonas Smedegaard <dr@jones.dk>2018-05-16 17:30:42 +0200
commitf494e4871e005895ef47b99ff70bad45d39ee6ea (patch)
tree019cfd7342a4d1ec604de20644c18ef5e6f1c894
parent7dd87387b7776769b80a4eaeb045f315142021da (diff)
Add target build-compact. Strip not yet implemented use of app places.
-rw-r--r--Makefile12
-rw-r--r--etc/build.js4
-rw-r--r--src/js/tours.js9
3 files changed, 12 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 9e82115..8ef6ec2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,15 @@
DATAFILES = src/data/bydele.json
-all: data-transform
+all: data-transform build-compact
init: fetch-vendor-kk
+# TODO: Call node (not nodejs) when Nodejs 6 (Debian buster) is stable
+build-compact: $(DATAFILES) \
+ $(wildcard src/js/*.js src/js/*/*.js src/js/*/*/*.js)
+ nodejs /usr/lib/nodejs/requirejs/r.js -o etc/build.js
+ touch $@
+
newfiles-vendor-kk = vendor/kk/*.json
fetch-vendor-kk:
bin/get-kk.sh
@@ -16,9 +22,11 @@ src/data/%.json: vendor/kk/%.geojson
jq --tab --sort-keys . $< > $@
clean:
+ rm -rf build
+ rm -f build-compact
distclean: clean
rm -f $(newfiles-vendor-kk)
rm -f fetch-vendor-kk
-.PHONY: all init data-transform clean distclean
+.PHONY: all init build-compact data-transform clean distclean
diff --git a/etc/build.js b/etc/build.js
index 3ecf8d0..9b96056 100644
--- a/etc/build.js
+++ b/etc/build.js
@@ -31,9 +31,7 @@
{
name: '../tours',
include: [
- 'json!data/copenhagen.json',
- 'app/places',
- 'json!data/tours.json'
+ 'json!data/bydele.json'
],
exclude: ['../slippymap']
}
diff --git a/src/js/tours.js b/src/js/tours.js
index 83e1cae..d941b4e 100644
--- a/src/js/tours.js
+++ b/src/js/tours.js
@@ -12,17 +12,10 @@ requirejs(['./slippymap'], function(_foo) {
]);
requirejs([
'app/boundary',
- 'json!data/copenhagen.json'
+ 'json!data/bydele.json'
], function(boundary, data) {
map.addLayer(boundary(data));
map.layers.addOverlay(boundary(data), 'Regionsgrænse');
});
- requirejs([
- 'app/places',
- 'json!data/tours.json',
- ], function(places, data, hook) {
- map.addLayer(places(data));
- hook(map);
- });
});
});