Add a hostexamples target to Makefile

This target copies the ol built files, examples, and loader script to the build/gh-pages directory, making it possible to host our examples on gh-pages.
This commit is contained in:
Éric Lemoine
2012-10-16 21:56:45 +02:00
parent 4b6ef3c046
commit 1ac188c906

View File

@@ -109,6 +109,14 @@ build/jsdoc-$(BRANCH)-timestamp: $(SRC) $(shell find doc/template -type f)
$(JSDOC) -t doc/template -r src -d build/gh-pages/$(BRANCH)/apidoc
touch $@
.PHONY: hostexamples
hostexamples: build examples
mkdir -p build/gh-pages/$(BRANCH)/examples
mkdir -p build/gh-pages/$(BRANCH)/build
cp $(EXAMPLES) $(subst .html,.js,$(EXAMPLES)) examples/style.css build/gh-pages/$(BRANCH)/examples/
cp build/loader_hosted_examples.js build/gh-pages/$(BRANCH)/examples/loader.js
cp build/ol.js build/ol.css build/gh-pages/$(BRANCH)/build/
.PHONY: test
test: $(INTERNAL_SRC)
$(PHANTOMJS) test/phantom-jasmine/run_jasmine_test.coffee test/ol.html