mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 22:03:37 +02:00
Make sure targets we use node to build actually get built.
This commit is contained in:
@@ -1,19 +1,46 @@
|
||||
# See the README for installation instructions.
|
||||
|
||||
all: \
|
||||
$(MAKI_TARGETS) \
|
||||
$(BUILDJS_TARGETS) \
|
||||
dist/iD.css \
|
||||
dist/iD.js \
|
||||
dist/iD.min.js \
|
||||
dist/presets.js \
|
||||
dist/imagery.js \
|
||||
dist/img/line-presets.png \
|
||||
dist/img/relation-presets.png
|
||||
|
||||
DATA_FILES = $(shell find data -type f -name '*.json' -o -name '*.md')
|
||||
data/data.js: $(DATA_FILES) dist/locales/en.json dist/img/maki-sprite.png
|
||||
node build.js
|
||||
MAKI_TARGETS = \
|
||||
css/feature-icons.css \
|
||||
data/feature-icons.json
|
||||
|
||||
dist/locales/en.json: data/core.yaml data/presets.yaml
|
||||
MAKI_SOURCES = \
|
||||
data/line-icons.json \
|
||||
data/relation-icons.json \
|
||||
node_modules/maki/www/maki-sprite.json \
|
||||
dist/img/maki-sprite.png
|
||||
|
||||
$(MAKI_TARGETS): $(MAKI_SOURCES)
|
||||
node data/maki_sprite.js
|
||||
|
||||
dist/img/maki-sprite.png: ./node_modules/maki/www/images/maki-sprite.png
|
||||
cp $< $@
|
||||
|
||||
BUILDJS_TARGETS = \
|
||||
data/presets/categories.json \
|
||||
data/presets/fields.json \
|
||||
data/presets/presets.json \
|
||||
data/presets.yaml \
|
||||
data/taginfo.json \
|
||||
data/data.js \
|
||||
dist/locales/en.js \
|
||||
dist/presets.js \
|
||||
dist/imagery.js
|
||||
|
||||
BUILDJS_SOURCES = \
|
||||
$(filter-out $(BUILDJS_TARGETS), $(shell find data -type f -name '*.json')) \
|
||||
data/core.yaml
|
||||
|
||||
$(BUILDJS_TARGETS): $(BUILDJS_SOURCES)
|
||||
node build.js
|
||||
|
||||
dist/iD.js: \
|
||||
@@ -77,14 +104,14 @@ dist/iD.min.js: dist/iD.js Makefile
|
||||
@rm -f $@
|
||||
node_modules/.bin/uglifyjs $< -c -m -o $@
|
||||
|
||||
dist/iD.css: css/*.css
|
||||
dist/iD.css: $(MAKI_TARGETS) css/*.css
|
||||
cat css/reset.css css/map.css css/app.css css/feature-icons.css > $@
|
||||
|
||||
node_modules/.install: package.json
|
||||
npm install && touch node_modules/.install
|
||||
|
||||
clean:
|
||||
rm -f dist/iD*.js dist/iD.css
|
||||
rm -f $(MAKI_TARGETS) $(BUILDJS_TARGETS) dist/iD*.js dist/iD.css
|
||||
|
||||
translations:
|
||||
node data/update_locales
|
||||
@@ -104,10 +131,6 @@ dist/img/line-presets.png: svg/line-presets.svg
|
||||
dist/img/relation-presets.png: svg/relation-presets.svg
|
||||
if [ `which inkscape` ]; then $(SPRITE) --export-png=$@ $<; else echo "Inkscape is not installed"; fi;
|
||||
|
||||
dist/img/maki-sprite.png: ./node_modules/maki/www/images/maki-sprite.png
|
||||
cp $< $@
|
||||
node data/maki_sprite
|
||||
|
||||
D3_FILES = \
|
||||
node_modules/d3/src/start.js \
|
||||
node_modules/d3/src/arrays/index.js \
|
||||
|
||||
Reference in New Issue
Block a user