Run lint on specs
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
/bin/plovr*.jar
|
/bin/plovr*.jar
|
||||||
/build/lint-timestamp
|
/build/lint-spec-timestamp
|
||||||
|
/build/lint-src-timestamp
|
||||||
/build/ol.js
|
/build/ol.js
|
||||||
/build/ol-all.js
|
/build/ol-all.js
|
||||||
/build/proj4js-combined.js
|
/build/proj4js-combined.js
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
JSDOC = jsdoc
|
JSDOC = jsdoc
|
||||||
PHANTOMJS = phantomjs
|
PHANTOMJS = phantomjs
|
||||||
PLOVR_JAR = bin/plovr-b254c26318c5.jar
|
PLOVR_JAR = bin/plovr-b254c26318c5.jar
|
||||||
|
SPEC = $(shell find test/spec -name \*.js)
|
||||||
SRC = $(shell find exports externs src/ol -name \*.js)
|
SRC = $(shell find exports externs src/ol -name \*.js)
|
||||||
TARGETS = $(shell find demos -name advanced-optimizations.js)
|
TARGETS = $(shell find demos -name advanced-optimizations.js)
|
||||||
comma := ,
|
comma := ,
|
||||||
@@ -104,11 +105,14 @@ serve: $(PLOVR_JAR) build/require-all.js
|
|||||||
java -jar $(PLOVR_JAR) serve build/*.json demos/*/*.json
|
java -jar $(PLOVR_JAR) serve build/*.json demos/*/*.json
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: build/lint-timestamp
|
lint: build/lint-src-timestamp build/lint-spec-timestamp
|
||||||
|
|
||||||
build/lint-timestamp: $(SRC)
|
build/lint-src-timestamp: $(SRC)
|
||||||
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(filter-out $(TARGETS),$(shell find demos -name \*.js)) && touch $@
|
gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(SRC) $(filter-out $(TARGETS),$(shell find demos -name \*.js)) && touch $@
|
||||||
|
|
||||||
|
build/lint-spec-timestamp: $(SPEC)
|
||||||
|
gjslint $(SPEC) && touch $@
|
||||||
|
|
||||||
.PHONY: plovr
|
.PHONY: plovr
|
||||||
plovr: $(PLOVR_JAR)
|
plovr: $(PLOVR_JAR)
|
||||||
|
|
||||||
@@ -125,7 +129,8 @@ test:
|
|||||||
$(PHANTOMJS) test/phantom-jasmine/run_jasmine_test.coffee test/ol.html
|
$(PHANTOMJS) test/phantom-jasmine/run_jasmine_test.coffee test/ol.html
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f build/lint-timestamp
|
rm -f build/lint-spec-timestamp
|
||||||
|
rm -f build/lint-src-timestamp
|
||||||
rm -f build/ol.js
|
rm -f build/ol.js
|
||||||
rm -f build/ol-all.js
|
rm -f build/ol-all.js
|
||||||
rm -f build/require-all.js
|
rm -f build/require-all.js
|
||||||
|
|||||||
Reference in New Issue
Block a user