mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
new preset build script, order is not significant
This commit is contained in:
@@ -13,7 +13,7 @@ all: \
|
||||
PRESET_FILES = $(shell find data/presets/presets -type f -name '*.json')
|
||||
|
||||
data/presets/presets.json: $(PRESET_FILES)
|
||||
cd data/presets && node build
|
||||
./data/presets/build.sh
|
||||
|
||||
# TODO: write a nice node script for this
|
||||
data/data.js: \
|
||||
@@ -81,3 +81,6 @@ iD.js: Makefile
|
||||
|
||||
clean:
|
||||
rm -f iD*.js
|
||||
|
||||
presets:
|
||||
./data/presets/build.sh
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
var fs = require('fs');
|
||||
|
||||
var wd = './';
|
||||
|
||||
var order = JSON.parse(fs.readFileSync(wd + 'presets/order.json', 'utf8'));
|
||||
|
||||
var presets = order.map(function(d) {
|
||||
return JSON.parse(fs.readFileSync(wd + 'presets/' + d + '.json', 'utf8'));
|
||||
});
|
||||
|
||||
fs.writeFileSync(wd + 'presets.json', JSON.stringify(presets, null, 4), 'utf8');
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
dir=$(dirname $0)
|
||||
presets=$(find $dir/presets -name "*.json" -exec cat {} \; -exec echo , \;)
|
||||
echo [${presets%?}] > $dir/presets.json
|
||||
node -e "
|
||||
var fs = require('fs');
|
||||
fs.writeFileSync('$dir/presets.json', JSON.stringify(JSON.parse(fs.readFileSync('$dir/presets.json', 'utf8')), null, 4));
|
||||
"
|
||||
@@ -1,89 +0,0 @@
|
||||
[
|
||||
"aeroway/aerodrome",
|
||||
"aeroway/helipad",
|
||||
"amenity/cafe",
|
||||
"leisure/park",
|
||||
"natural/bay",
|
||||
"natural/beach",
|
||||
"natural/cliff",
|
||||
"natural/coastline",
|
||||
"natural/glacier",
|
||||
"natural/grassland",
|
||||
"natural/heath",
|
||||
"natural/peak",
|
||||
"natural/scrub",
|
||||
"natural/spring",
|
||||
"natural/tree",
|
||||
"natural/water",
|
||||
"natural/water/lake",
|
||||
"natural/water/pond",
|
||||
"natural/water/reservoir",
|
||||
"natural/wetland",
|
||||
"natural/wood",
|
||||
"place/island",
|
||||
"shop/supermarket",
|
||||
"amenity/restaurant",
|
||||
"amenity/place_of_worship",
|
||||
"amenity/place_of_worship/christian",
|
||||
"amenity/place_of_worship/jewish",
|
||||
"amenity/place_of_worship/muslim",
|
||||
"amenity/school",
|
||||
"amenity/university",
|
||||
"amenity/parking",
|
||||
"amenity/bank",
|
||||
"amenity/fast_food",
|
||||
"amenity/bar",
|
||||
"amenity/pub",
|
||||
"amenity/cinema",
|
||||
"amenity/hospital",
|
||||
"amenity/pharmacy",
|
||||
"amenity/fire_station",
|
||||
"amenity/police",
|
||||
"amenity/post_box",
|
||||
"amenity/library",
|
||||
"amenity/toilets",
|
||||
"tourism/hotel",
|
||||
"tourism/museum",
|
||||
"tourism/picnic_site",
|
||||
"amenity/townhall",
|
||||
"leisure/golf_course",
|
||||
"waterway/river",
|
||||
"waterway/stream",
|
||||
"highway/motorway",
|
||||
"highway/residential",
|
||||
"highway/primary",
|
||||
"highway/secondary",
|
||||
"highway/tertiary",
|
||||
"highway/service",
|
||||
"highway/path",
|
||||
"highway/track",
|
||||
"highway/steps",
|
||||
"landuse/allotments",
|
||||
"landuse/cemetery",
|
||||
"landuse/commercial",
|
||||
"landuse/farm",
|
||||
"landuse/farmyard",
|
||||
"landuse/forest",
|
||||
"landuse/grass",
|
||||
"landuse/industrial",
|
||||
"landuse/meadow",
|
||||
"landuse/orchard",
|
||||
"landuse/quarry",
|
||||
"landuse/residential",
|
||||
"landuse/vineyard",
|
||||
"railway/rail",
|
||||
"railway/subway",
|
||||
"railway/subway_entrance",
|
||||
"highway/trunk",
|
||||
"highway/footway",
|
||||
"highway/cycleway",
|
||||
"leisure/pitch",
|
||||
"leisure/pitch/baseball",
|
||||
"leisure/pitch/soccer",
|
||||
"leisure/pitch/tennis",
|
||||
"leisure/pitch/basketball",
|
||||
"building/*",
|
||||
"highway/bus_stop",
|
||||
"highway/turning_circle",
|
||||
"highway/crossing"
|
||||
]
|
||||
Reference in New Issue
Block a user