Change examples directory names to "examples"

This commit is contained in:
Éric Lemoine
2012-09-28 14:01:51 +02:00
parent 310d5bfeaa
commit 896f5203db
12 changed files with 16 additions and 16 deletions
+11 -11
View File
@@ -3,13 +3,13 @@ PHANTOMJS = phantomjs
PLOVR_JAR = bin/plovr-b254c26318c5.jar
SPEC = $(shell find test/spec -name \*.js)
SRC = $(shell find exports externs src/ol -name \*.js)
EXAMPLES = $(shell find demos -maxdepth 1 -name \*.html)
EXAMPLES = $(shell find examples -maxdepth 1 -name \*.html)
comma := ,
empty :=
space := $(empty) $(empty)
.PHONY: all
all: build-all build demos
all: build-all build examples
.PHONY: precommit
precommit: lint build-all doc test build
@@ -31,26 +31,26 @@ build/ol-all.js: $(PLOVR_JAR) $(SRC) base.json build/ol-all.json build/require-a
build/require-all.js: $(SRC)
( echo "goog.require('goog.dom');" ; find src/ol -name \*.js | xargs grep -rh ^goog.provide | sort | uniq | sed -e 's/provide/require/g' ) >$@
.PHONY: demos
demos: $(subst .html,.json,$(EXAMPLES))
.PHONY: examples
examples: $(subst .html,.json,$(EXAMPLES))
demos/%.json: base.json
examples/%.json: base.json
@echo "{\"id\": \"$(basename $(notdir $@))\", \"inherits\": \"../base.json\", \"inputs\": \"$(subst .json,.js,$@)\"}" > $@
demos/%.combined.js: $(PLOVR_JAR) base.json demos/%.js
examples/%.combined.js: $(PLOVR_JAR) base.json examples/%.js
java -jar $(PLOVR_JAR) build $(subst .combined.js,.json,$@) >$@
@echo $@ "uncompressed:" $$(wc -c <$@) bytes
@echo $@ " compressed:" $$(gzip -9 -c <$@ | wc -c) bytes
.PHONY: serve
serve: $(PLOVR_JAR) build/require-all.js demos
java -jar $(PLOVR_JAR) serve build/*.json demos/*.json
serve: $(PLOVR_JAR) build/require-all.js examples
java -jar $(PLOVR_JAR) serve build/*.json examples/*.json
.PHONY: lint
lint: build/lint-src-timestamp build/lint-spec-timestamp
build/lint-src-timestamp: $(SRC)
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(filter-out $(shell find demos -name \*.combined.js),$(shell find demos -name \*.js)) && touch $@
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(filter-out $(shell find examples -name \*.combined.js),$(shell find examples -name \*.js)) && touch $@
build/lint-spec-timestamp: $(SPEC)
gjslint $(SPEC) && touch $@
@@ -80,8 +80,8 @@ clean:
rm -f build/ol.js
rm -f build/ol-all.js
rm -f build/require-all.js
rm -f demos/*.json
rm -f demos/*.combined.js
rm -f examples/*.json
rm -f examples/*.combined.js
rm -rf build/apidoc
reallyclean: clean