diff --git a/.gitignore b/.gitignore index 33895d5e43..0eb23476a1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,7 @@ /examples/example-list.xml /bin/plovr*.jar /jsdoc/ +/ol.js +/ol-skeleton*.js /plovr*.jar /webgl-debug.js diff --git a/Makefile b/Makefile index 11ced70b6c..a8e0e715d6 100644 --- a/Makefile +++ b/Makefile @@ -53,19 +53,58 @@ space := $(empty) $(empty) all: build webgl-debug.js .PHONY: build -build: $(PLOVR_JAR) - java -jar $(PLOVR_JAR) build main.json >api.js +build: ol.js ol-skeleton.js ol-skeleton-debug.js ol-skeleton-dom.js ol-skeleton-webgl.js + +.PHONY: ol.js +ol.js: $(PLOVR_JAR) + java -jar $(PLOVR_JAR) build $(basename $@).json >$@ + @echo $@ "uncompressed:" $(shell wc -c <$@) bytes + @echo $@ " compressed:" $(shell gzip -9 -c <$@ | wc -c) bytes + +.PHONY: ol-skeleton.js +ol-skeleton.js: $(PLOVR_JAR) + java -jar $(PLOVR_JAR) build $(basename $@).json >$@ + @echo $@ "uncompressed:" $(shell wc -c <$@) bytes + @echo $@ " compressed:" $(shell gzip -9 -c <$@ | wc -c) bytes + +.PHONY: ol-skeleton-debug.js +ol-skeleton-debug.js: $(PLOVR_JAR) + java -jar $(PLOVR_JAR) build $(basename $@).json >$@ + @echo $@ "uncompressed:" $(shell wc -c <$@) bytes + @echo $@ " compressed:" $(shell gzip -9 -c <$@ | wc -c) bytes + +.PHONY: ol-skeleton-dom.js +ol-skeleton-dom.js: $(PLOVR_JAR) + java -jar $(PLOVR_JAR) build $(basename $@).json >$@ + @echo $@ "uncompressed:" $(shell wc -c <$@) bytes + @echo $@ " compressed:" $(shell gzip -9 -c <$@ | wc -c) bytes + +.PHONY: ol-skeleton-webgl.js +ol-skeleton-webgl.js: $(PLOVR_JAR) + java -jar $(PLOVR_JAR) build $(basename $@).json >$@ + @echo $@ "uncompressed:" $(shell wc -c <$@) bytes + @echo $@ " compressed:" $(shell gzip -9 -c <$@ | wc -c) bytes .PHONY: serve serve: $(PLOVR_JAR) - java -jar $(PLOVR_JAR) serve main.json + java -jar $(PLOVR_JAR) serve *.json .PHONY: lint -lint: $(CLOSURE_LINTER) - gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(filter-out $(GSLINT_EXCLUDES),$(shell find externs src -name \*.js)) +lint: + gjslint --strict --limited_doc_files=$(subst $(space),$(comma),$(shell find externs -name \*.js)) $(filter-out $(GSLINT_EXCLUDES),$(shell find externs src -name \*.js)) skeleton.js webgl-debug.js: curl https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/debug/webgl-debug.js > $@ $(PLOVR_JAR): curl http://plovr.googlecode.com/files/$(PLOVR_JAR) > $@ + +clean: + rm -f ol-skeleton.js + rm -f ol-skeleton-debug.js + rm -f ol-skeleton-dom.js + rm -f ol-skeleton-webgl.js + +reallyclean: clean + rm -f $(PLOVR_JAR) + rm -f webgl-debug.js diff --git a/ol-skeleton-debug.json b/ol-skeleton-debug.json new file mode 100644 index 0000000000..ff325182cd --- /dev/null +++ b/ol-skeleton-debug.json @@ -0,0 +1,36 @@ +{ + "id": "ol-skeleton-debug", + + "inputs": "skeleton.js", + + "paths": [ + "src" + ], + + "define": { + "goog.dom.ASSUME_STANDARDS_MODE": true, + "goog.DEBUG": true + }, + + "externs": [ + "externs/webgl-debug.js" + ], + + "mode": "ADVANCED", + "level": "VERBOSE", + + "checks": { + "accessControls": "ERROR", + "visibility": "ERROR", + "checkTypes": "ERROR", + "checkRegExp": "ERROR", + "checkVars": "ERROR", + "deprecated": "ERROR", + "fileoverviewTags": "ERROR", + "invalidCasts": "ERROR", + "missingProperties": "ERROR", + "nonStandardJsDocs": "ERROR", + "undefinedVars": "ERROR" + } + +} diff --git a/ol-skeleton-dom.json b/ol-skeleton-dom.json new file mode 100644 index 0000000000..7921d2a654 --- /dev/null +++ b/ol-skeleton-dom.json @@ -0,0 +1,38 @@ +{ + "id": "ol-skeleton-dom", + + "inputs": "skeleton.js", + + "paths": [ + "src" + ], + + "define": { + "goog.dom.ASSUME_STANDARDS_MODE": true, + "ol.ENABLE_DOM": true, + "ol.ENABLE_WEBGL": false, + "goog.DEBUG": false + }, + + "externs": [ + "externs/webgl-debug.js" + ], + + "mode": "ADVANCED", + "level": "VERBOSE", + + "checks": { + "accessControls": "ERROR", + "visibility": "ERROR", + "checkTypes": "ERROR", + "checkRegExp": "ERROR", + "checkVars": "ERROR", + "deprecated": "ERROR", + "fileoverviewTags": "ERROR", + "invalidCasts": "ERROR", + "missingProperties": "ERROR", + "nonStandardJsDocs": "ERROR", + "undefinedVars": "ERROR" + } + +} diff --git a/ol-skeleton-webgl.json b/ol-skeleton-webgl.json new file mode 100644 index 0000000000..99a4e3461f --- /dev/null +++ b/ol-skeleton-webgl.json @@ -0,0 +1,38 @@ +{ + "id": "ol-skeleton-webgl", + + "inputs": "skeleton.js", + + "paths": [ + "src" + ], + + "define": { + "goog.dom.ASSUME_STANDARDS_MODE": true, + "ol.ENABLE_DOM": false, + "ol.ENABLE_WEBGL": true, + "goog.DEBUG": false + }, + + "externs": [ + "externs/webgl-debug.js" + ], + + "mode": "ADVANCED", + "level": "VERBOSE", + + "checks": { + "accessControls": "ERROR", + "visibility": "ERROR", + "checkTypes": "ERROR", + "checkRegExp": "ERROR", + "checkVars": "ERROR", + "deprecated": "ERROR", + "fileoverviewTags": "ERROR", + "invalidCasts": "ERROR", + "missingProperties": "ERROR", + "nonStandardJsDocs": "ERROR", + "undefinedVars": "ERROR" + } + +} diff --git a/ol-skeleton.json b/ol-skeleton.json new file mode 100644 index 0000000000..77e8edfd4c --- /dev/null +++ b/ol-skeleton.json @@ -0,0 +1,36 @@ +{ + "id": "ol-skeleton", + + "inputs": "skeleton.js", + + "paths": [ + "src" + ], + + "define": { + "goog.dom.ASSUME_STANDARDS_MODE": true, + "goog.DEBUG": false + }, + + "externs": [ + "externs/webgl-debug.js" + ], + + "mode": "ADVANCED", + "level": "VERBOSE", + + "checks": { + "accessControls": "ERROR", + "visibility": "ERROR", + "checkTypes": "ERROR", + "checkRegExp": "ERROR", + "checkVars": "ERROR", + "deprecated": "ERROR", + "fileoverviewTags": "ERROR", + "invalidCasts": "ERROR", + "missingProperties": "ERROR", + "nonStandardJsDocs": "ERROR", + "undefinedVars": "ERROR" + } + +} diff --git a/ol.json b/ol.json new file mode 100644 index 0000000000..08db84ebc6 --- /dev/null +++ b/ol.json @@ -0,0 +1,36 @@ +{ + "id": "ol", + + "inputs": "src/ol/ol.js", + + "paths": [ + "src" + ], + + "define": { + "goog.dom.ASSUME_STANDARDS_MODE": true, + "goog.DEBUG": false + }, + + "externs": [ + "externs/webgl-debug.js" + ], + + "mode": "ADVANCED", + "level": "VERBOSE", + + "checks": { + "accessControls": "ERROR", + "visibility": "ERROR", + "checkTypes": "ERROR", + "checkRegExp": "ERROR", + "checkVars": "ERROR", + "deprecated": "ERROR", + "fileoverviewTags": "ERROR", + "invalidCasts": "ERROR", + "missingProperties": "ERROR", + "nonStandardJsDocs": "ERROR", + "undefinedVars": "ERROR" + } + +} diff --git a/skeleton.html b/skeleton.html index 00b534e28a..eecfdc6f80 100644 --- a/skeleton.html +++ b/skeleton.html @@ -12,23 +12,6 @@
- - +