From d81b232587228ce9a711c4dc67086233672f55e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Sat, 20 Oct 2012 22:31:33 +0200 Subject: [PATCH 1/2] Granularize the exports This commit decomposes exports.txt into multiple, per-component, export files. This will be required for custom builds; --- Makefile | 17 ++-- src/goog.exports | 1 + src/ol/collection.exports | 11 ++ src/ol/control/attribution.exports | 6 ++ src/ol/control/mouseposition.exports | 9 ++ src/ol/control/zoom.exports | 7 ++ src/ol/coordinate.exports | 2 + src/ol/exports.txt | 144 --------------------------- src/ol/extent.exports | 2 + src/ol/interaction/keyboard.exports | 3 + src/ol/layer/layer.exports | 9 ++ src/ol/layer/tilelayer.exports | 1 + src/ol/map.exports | 35 +++++++ src/ol/mapbrowserevent.exports | 2 + src/ol/object.exports | 10 ++ src/ol/overlay/overlay.exports | 11 ++ src/ol/projection.exports | 10 ++ src/ol/source/bingmaps.exports | 12 +++ src/ol/source/mapquest.exports | 2 + src/ol/source/openstreetmap.exports | 2 + src/ol/source/stamen.exports | 2 + src/ol/source/tilejson.exports | 1 + 22 files changed, 147 insertions(+), 152 deletions(-) create mode 100644 src/goog.exports create mode 100644 src/ol/collection.exports create mode 100644 src/ol/control/attribution.exports create mode 100644 src/ol/control/mouseposition.exports create mode 100644 src/ol/control/zoom.exports create mode 100644 src/ol/coordinate.exports delete mode 100644 src/ol/exports.txt create mode 100644 src/ol/extent.exports create mode 100644 src/ol/interaction/keyboard.exports create mode 100644 src/ol/layer/layer.exports create mode 100644 src/ol/layer/tilelayer.exports create mode 100644 src/ol/map.exports create mode 100644 src/ol/mapbrowserevent.exports create mode 100644 src/ol/object.exports create mode 100644 src/ol/overlay/overlay.exports create mode 100644 src/ol/projection.exports create mode 100644 src/ol/source/bingmaps.exports create mode 100644 src/ol/source/mapquest.exports create mode 100644 src/ol/source/openstreetmap.exports create mode 100644 src/ol/source/stamen.exports create mode 100644 src/ol/source/tilejson.exports diff --git a/Makefile b/Makefile index 8e555c0897..ffc3468d43 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PHANTOMJS = phantomjs PLOVR_JAR = bin/plovr-b254c26318c5.jar SPEC = $(shell find test/spec -name \*.js) SRC = $(shell find externs src/ol -name \*.js) +EXPORTS = $(shell find src -name \*.exports) INTERNAL_SRC = \ build/src/internal/src/requireall.js \ build/src/internal/src/types.js @@ -40,25 +41,25 @@ build-all: build/ol-all.js build/ol-all.js: $(PLOVR_JAR) $(SRC) $(INTERNAL_SRC) base.json build/ol-all.json java -jar $(PLOVR_JAR) build build/ol-all.json >$@ || ( rm -f $@ ; false ) -build/src/external/externs/types.js: bin/generate-exports src/ol/exports.txt +build/src/external/externs/types.js: bin/generate-exports $(EXPORTS) mkdir -p $(dir $@) - bin/generate-exports --externs src/ol/exports.txt >$@ || ( rm -f $@ ; false ) + bin/generate-exports --externs $(EXPORTS) >$@ || ( rm -f $@ ; false ) -build/src/external/src/exports.js: bin/generate-exports src/ol/exports.txt +build/src/external/src/exports.js: bin/generate-exports $(EXPORTS) mkdir -p $(dir $@) - bin/generate-exports --exports src/ol/exports.txt >$@ || ( rm -f $@ ; false ) + bin/generate-exports --exports $(EXPORTS) >$@ || ( rm -f $@ ; false ) -build/src/external/src/types.js: bin/generate-exports src/ol/exports.txt +build/src/external/src/types.js: bin/generate-exports $(EXPORTS) mkdir -p $(dir $@) - bin/generate-exports --typedef src/ol/exports.txt >$@ || ( rm -f $@ ; false ) + bin/generate-exports --typedef $(EXPORTS) >$@ || ( rm -f $@ ; false ) build/src/internal/src/requireall.js: bin/generate-requireall $(SRC) mkdir -p $(dir $@) bin/generate-requireall --require=goog.dom src/ol >$@ || ( rm -f $@ ; false ) -build/src/internal/src/types.js: bin/generate-exports src/ol/exports.txt +build/src/internal/src/types.js: bin/generate-exports $(EXPORTS) mkdir -p $(dir $@) - bin/generate-exports --typedef src/ol/exports.txt >$@ || ( rm -f $@ ; false ) + bin/generate-exports --typedef $(EXPORTS) >$@ || ( rm -f $@ ; false ) .PHONY: build-examples build-examples: examples $(subst .html,.combined.js,$(EXAMPLES)) diff --git a/src/goog.exports b/src/goog.exports new file mode 100644 index 0000000000..b8ccadc37a --- /dev/null +++ b/src/goog.exports @@ -0,0 +1 @@ +@exportSymbol goog.require goog.nullFunction diff --git a/src/ol/collection.exports b/src/ol/collection.exports new file mode 100644 index 0000000000..b052cc13f2 --- /dev/null +++ b/src/ol/collection.exports @@ -0,0 +1,11 @@ +@exportSymbol ol.Collection +@exportProperty ol.Collection.prototype.clear +@exportProperty ol.Collection.prototype.forEach +@exportProperty ol.Collection.prototype.getArray +@exportProperty ol.Collection.prototype.getAt +@exportProperty ol.Collection.prototype.getLength +@exportProperty ol.Collection.prototype.insertAt +@exportProperty ol.Collection.prototype.pop +@exportProperty ol.Collection.prototype.push +@exportProperty ol.Collection.prototype.removeAt +@exportProperty ol.Collection.prototype.setAt diff --git a/src/ol/control/attribution.exports b/src/ol/control/attribution.exports new file mode 100644 index 0000000000..4de1ec0276 --- /dev/null +++ b/src/ol/control/attribution.exports @@ -0,0 +1,6 @@ +@exportObjectLiteral ol.control.AttributionOptions +@exportObjectLiteralProperty ol.control.AttributionOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.AttributionOptions.target Element|undefined + +@exportClass ol.control.Attribution ol.control.AttributionOptions + diff --git a/src/ol/control/mouseposition.exports b/src/ol/control/mouseposition.exports new file mode 100644 index 0000000000..b36932efc9 --- /dev/null +++ b/src/ol/control/mouseposition.exports @@ -0,0 +1,9 @@ +@exportObjectLiteral ol.control.MousePositionOptions +@exportObjectLiteralProperty ol.control.MousePositionOptions.coordinateFormat ol.CoordinateFormatType|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.projection ol.Projection|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.target Element|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.undefinedHtml string|undefined + +@exportClass ol.control.MousePosition ol.control.MousePositionOptions + diff --git a/src/ol/control/zoom.exports b/src/ol/control/zoom.exports new file mode 100644 index 0000000000..1121653649 --- /dev/null +++ b/src/ol/control/zoom.exports @@ -0,0 +1,7 @@ +@exportObjectLiteral ol.control.ZoomOptions +@exportObjectLiteralProperty ol.control.ZoomOptions.delta number|undefined +@exportObjectLiteralProperty ol.control.ZoomOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.ZoomOptions.target Element|undefined + +@exportClass ol.control.Zoom ol.control.ZoomOptions + diff --git a/src/ol/coordinate.exports b/src/ol/coordinate.exports new file mode 100644 index 0000000000..1dec787cd7 --- /dev/null +++ b/src/ol/coordinate.exports @@ -0,0 +1,2 @@ +@exportSymbol ol.Coordinate +@exportProperty ol.Coordinate.toStringHDMS diff --git a/src/ol/exports.txt b/src/ol/exports.txt deleted file mode 100644 index ecb405fba8..0000000000 --- a/src/ol/exports.txt +++ /dev/null @@ -1,144 +0,0 @@ -@exportSymbol goog.require goog.nullFunction - -@exportProperty ol.MapBrowserEvent.prototype.getCoordinate - -@exportSymbol ol.Collection -@exportProperty ol.Collection.prototype.clear -@exportProperty ol.Collection.prototype.forEach -@exportProperty ol.Collection.prototype.getArray -@exportProperty ol.Collection.prototype.getAt -@exportProperty ol.Collection.prototype.getLength -@exportProperty ol.Collection.prototype.insertAt -@exportProperty ol.Collection.prototype.pop -@exportProperty ol.Collection.prototype.push -@exportProperty ol.Collection.prototype.removeAt -@exportProperty ol.Collection.prototype.setAt - -@exportSymbol ol.Coordinate -@exportProperty ol.Coordinate.toStringHDMS - -@exportSymbol ol.Extent - -@exportObjectLiteral ol.MapOptions -@exportObjectLiteralProperty ol.MapOptions.center ol.Coordinate|undefined -@exportObjectLiteralProperty ol.MapOptions.controls ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.doubleClickZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.dragPan boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.interactions ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.keyboard boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.keyboardPanOffset number|undefined -@exportObjectLiteralProperty ol.MapOptions.layers ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.maxResolution number|undefined -@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoomDelta number|undefined -@exportObjectLiteralProperty ol.MapOptions.numZoomLevels number|undefined -@exportObjectLiteralProperty ol.MapOptions.projection ol.Projection|string|undefined -@exportObjectLiteralProperty ol.MapOptions.renderer ol.RendererHint|undefined -@exportObjectLiteralProperty ol.MapOptions.renderers Array.|undefined -@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined -@exportObjectLiteralProperty ol.MapOptions.resolutions Array.|undefined -@exportObjectLiteralProperty ol.MapOptions.rotate boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.shiftDragZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.target Element|string -@exportObjectLiteralProperty ol.MapOptions.userProjection ol.Projection|string|undefined -@exportObjectLiteralProperty ol.MapOptions.zoom number|undefined -@exportObjectLiteralProperty ol.MapOptions.zoomDelta number|undefined -@exportObjectLiteralProperty ol.MapOptions.zoomFactor number|undefined - -@exportClass ol.Map ol.MapOptions -@exportProperty ol.Map.prototype.getControls -@exportProperty ol.Map.prototype.getInteractions - -@exportSymbol ol.Object -@exportProperty ol.Object.prototype.bindTo -@exportProperty ol.Object.prototype.changed -@exportProperty ol.Object.prototype.get -@exportProperty ol.Object.prototype.notify -@exportProperty ol.Object.prototype.set -@exportProperty ol.Object.prototype.setOptions -@exportProperty ol.Object.prototype.setValues -@exportProperty ol.Object.prototype.unbind -@exportProperty ol.Object.prototype.unbindAll - -@exportSymbol ol.Projection -@exportProperty ol.Projection.getFromCode -@exportProperty ol.Projection.getTransform -@exportProperty ol.Projection.getTransformFromCodes -@exportProperty ol.Projection.transform -@exportProperty ol.Projection.transformWithCodes -@exportProperty ol.Projection.prototype.getCode -@exportProperty ol.Projection.prototype.getExtent -@exportProperty ol.Projection.prototype.getUnits - -@exportSymbol ol.RendererHint -@exportProperty ol.RendererHint.DOM -@exportProperty ol.RendererHint.WEBGL - -@exportObjectLiteral ol.control.AttributionOptions -@exportObjectLiteralProperty ol.control.AttributionOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.AttributionOptions.target Element|undefined - -@exportClass ol.control.Attribution ol.control.AttributionOptions - -@exportObjectLiteral ol.control.MousePositionOptions -@exportObjectLiteralProperty ol.control.MousePositionOptions.coordinateFormat ol.CoordinateFormatType|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.projection ol.Projection|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.target Element|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.undefinedHtml string|undefined - -@exportClass ol.control.MousePosition ol.control.MousePositionOptions - -@exportObjectLiteral ol.control.ZoomOptions -@exportObjectLiteralProperty ol.control.ZoomOptions.delta number|undefined -@exportObjectLiteralProperty ol.control.ZoomOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.ZoomOptions.target Element|undefined - -@exportClass ol.control.Zoom ol.control.ZoomOptions - -@exportObjectLiteral ol.layer.LayerOptions -@exportObjectLiteralProperty ol.layer.LayerOptions.brightness number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.contrast number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.hue number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.opacity number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.saturation number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.source ol.source.Source -@exportObjectLiteralProperty ol.layer.LayerOptions.visible boolean|undefined - -@exportSymbol ol.interaction.Keyboard -@exportProperty ol.interaction.Keyboard.prototype.addCallback - -@exportClass ol.layer.TileLayer ol.layer.LayerOptions - -@exportObjectLiteral ol.overlay.OverlayOptions -@exportObjectLiteralProperty ol.overlay.OverlayOptions.coordinate ol.Coordinate|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.element Element|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.positioning Array.|undefined - -@exportClass ol.overlay.Overlay ol.overlay.OverlayOptions -@exportProperty ol.overlay.Overlay.prototype.getElement -@exportProperty ol.overlay.Overlay.prototype.setCoordinate -@exportProperty ol.overlay.Overlay.prototype.setMap - -@exportSymbol ol.source.BingMaps -@exportSymbol ol.BingMapsStyle -@exportProperty ol.BingMapsStyle.AERIAL -@exportProperty ol.BingMapsStyle.AERIAL_WITH_LABELS -@exportProperty ol.BingMapsStyle.ROAD -@exportProperty ol.BingMapsStyle.ORDNANCE_SURVEY -@exportProperty ol.BingMapsStyle.COLLINS_BART -@exportObjectLiteral ol.source.BingMapsOptions -@exportObjectLiteralProperty ol.source.BingMapsOptions.culture string|undefined -@exportObjectLiteralProperty ol.source.BingMapsOptions.key string -@exportObjectLiteralProperty ol.source.BingMapsOptions.style ol.BingMapsStyle - -@exportSymbol ol.source.MapQuestOSM - -@exportSymbol ol.source.MapQuestOpenAerial - -@exportSymbol ol.source.OpenStreetMap - -@exportSymbol ol.source.Stamen - -@exportSymbol ol.source.TileJSON diff --git a/src/ol/extent.exports b/src/ol/extent.exports new file mode 100644 index 0000000000..23e1785d4f --- /dev/null +++ b/src/ol/extent.exports @@ -0,0 +1,2 @@ +@exportSymbol ol.Extent + diff --git a/src/ol/interaction/keyboard.exports b/src/ol/interaction/keyboard.exports new file mode 100644 index 0000000000..45ab209343 --- /dev/null +++ b/src/ol/interaction/keyboard.exports @@ -0,0 +1,3 @@ +@exportSymbol ol.interaction.Keyboard +@exportProperty ol.interaction.Keyboard.prototype.addCallback + diff --git a/src/ol/layer/layer.exports b/src/ol/layer/layer.exports new file mode 100644 index 0000000000..abcaeb62c3 --- /dev/null +++ b/src/ol/layer/layer.exports @@ -0,0 +1,9 @@ +@exportObjectLiteral ol.layer.LayerOptions +@exportObjectLiteralProperty ol.layer.LayerOptions.brightness number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.contrast number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.hue number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.opacity number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.saturation number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.source ol.source.Source +@exportObjectLiteralProperty ol.layer.LayerOptions.visible boolean|undefined + diff --git a/src/ol/layer/tilelayer.exports b/src/ol/layer/tilelayer.exports new file mode 100644 index 0000000000..a567e216ff --- /dev/null +++ b/src/ol/layer/tilelayer.exports @@ -0,0 +1 @@ +@exportClass ol.layer.TileLayer ol.layer.LayerOptions diff --git a/src/ol/map.exports b/src/ol/map.exports new file mode 100644 index 0000000000..63ffc10366 --- /dev/null +++ b/src/ol/map.exports @@ -0,0 +1,35 @@ +@exportObjectLiteral ol.MapOptions +@exportObjectLiteralProperty ol.MapOptions.center ol.Coordinate|undefined +@exportObjectLiteralProperty ol.MapOptions.controls ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.doubleClickZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.dragPan boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.interactions ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.keyboard boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.keyboardPanOffset number|undefined +@exportObjectLiteralProperty ol.MapOptions.layers ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.maxResolution number|undefined +@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoomDelta number|undefined +@exportObjectLiteralProperty ol.MapOptions.numZoomLevels number|undefined +@exportObjectLiteralProperty ol.MapOptions.projection ol.Projection|string|undefined +@exportObjectLiteralProperty ol.MapOptions.renderer ol.RendererHint|undefined +@exportObjectLiteralProperty ol.MapOptions.renderers Array.|undefined +@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined +@exportObjectLiteralProperty ol.MapOptions.resolutions Array.|undefined +@exportObjectLiteralProperty ol.MapOptions.rotate boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.shiftDragZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.target Element|string +@exportObjectLiteralProperty ol.MapOptions.userProjection ol.Projection|string|undefined +@exportObjectLiteralProperty ol.MapOptions.zoom number|undefined +@exportObjectLiteralProperty ol.MapOptions.zoomDelta number|undefined +@exportObjectLiteralProperty ol.MapOptions.zoomFactor number|undefined + +@exportClass ol.Map ol.MapOptions +@exportProperty ol.Map.prototype.getControls +@exportProperty ol.Map.prototype.getInteractions + +@exportSymbol ol.RendererHint +@exportProperty ol.RendererHint.DOM +@exportProperty ol.RendererHint.WEBGL + + diff --git a/src/ol/mapbrowserevent.exports b/src/ol/mapbrowserevent.exports new file mode 100644 index 0000000000..38eafbb2a1 --- /dev/null +++ b/src/ol/mapbrowserevent.exports @@ -0,0 +1,2 @@ +@exportProperty ol.MapBrowserEvent.prototype.getCoordinate + diff --git a/src/ol/object.exports b/src/ol/object.exports new file mode 100644 index 0000000000..98c8370bdb --- /dev/null +++ b/src/ol/object.exports @@ -0,0 +1,10 @@ +@exportSymbol ol.Object +@exportProperty ol.Object.prototype.bindTo +@exportProperty ol.Object.prototype.changed +@exportProperty ol.Object.prototype.get +@exportProperty ol.Object.prototype.notify +@exportProperty ol.Object.prototype.set +@exportProperty ol.Object.prototype.setOptions +@exportProperty ol.Object.prototype.setValues +@exportProperty ol.Object.prototype.unbind +@exportProperty ol.Object.prototype.unbindAll diff --git a/src/ol/overlay/overlay.exports b/src/ol/overlay/overlay.exports new file mode 100644 index 0000000000..e902799d03 --- /dev/null +++ b/src/ol/overlay/overlay.exports @@ -0,0 +1,11 @@ +@exportObjectLiteral ol.overlay.OverlayOptions +@exportObjectLiteralProperty ol.overlay.OverlayOptions.coordinate ol.Coordinate|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.element Element|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.positioning Array.|undefined + +@exportClass ol.overlay.Overlay ol.overlay.OverlayOptions +@exportProperty ol.overlay.Overlay.prototype.getElement +@exportProperty ol.overlay.Overlay.prototype.setCoordinate +@exportProperty ol.overlay.Overlay.prototype.setMap + diff --git a/src/ol/projection.exports b/src/ol/projection.exports new file mode 100644 index 0000000000..9dcb5c1ada --- /dev/null +++ b/src/ol/projection.exports @@ -0,0 +1,10 @@ +@exportSymbol ol.Projection +@exportProperty ol.Projection.getFromCode +@exportProperty ol.Projection.getTransform +@exportProperty ol.Projection.getTransformFromCodes +@exportProperty ol.Projection.transform +@exportProperty ol.Projection.transformWithCodes +@exportProperty ol.Projection.prototype.getCode +@exportProperty ol.Projection.prototype.getExtent +@exportProperty ol.Projection.prototype.getUnits + diff --git a/src/ol/source/bingmaps.exports b/src/ol/source/bingmaps.exports new file mode 100644 index 0000000000..7bec9b3194 --- /dev/null +++ b/src/ol/source/bingmaps.exports @@ -0,0 +1,12 @@ +@exportSymbol ol.source.BingMaps +@exportSymbol ol.BingMapsStyle +@exportProperty ol.BingMapsStyle.AERIAL +@exportProperty ol.BingMapsStyle.AERIAL_WITH_LABELS +@exportProperty ol.BingMapsStyle.ROAD +@exportProperty ol.BingMapsStyle.ORDNANCE_SURVEY +@exportProperty ol.BingMapsStyle.COLLINS_BART +@exportObjectLiteral ol.source.BingMapsOptions +@exportObjectLiteralProperty ol.source.BingMapsOptions.culture string|undefined +@exportObjectLiteralProperty ol.source.BingMapsOptions.key string +@exportObjectLiteralProperty ol.source.BingMapsOptions.style ol.BingMapsStyle + diff --git a/src/ol/source/mapquest.exports b/src/ol/source/mapquest.exports new file mode 100644 index 0000000000..d26cb03f25 --- /dev/null +++ b/src/ol/source/mapquest.exports @@ -0,0 +1,2 @@ +@exportSymbol ol.source.MapQuestOSM +@exportSymbol ol.source.MapQuestOpenAerial diff --git a/src/ol/source/openstreetmap.exports b/src/ol/source/openstreetmap.exports new file mode 100644 index 0000000000..a2b205a252 --- /dev/null +++ b/src/ol/source/openstreetmap.exports @@ -0,0 +1,2 @@ +@exportSymbol ol.source.OpenStreetMap + diff --git a/src/ol/source/stamen.exports b/src/ol/source/stamen.exports new file mode 100644 index 0000000000..bc110646c5 --- /dev/null +++ b/src/ol/source/stamen.exports @@ -0,0 +1,2 @@ +@exportSymbol ol.source.Stamen + diff --git a/src/ol/source/tilejson.exports b/src/ol/source/tilejson.exports new file mode 100644 index 0000000000..56b3f56285 --- /dev/null +++ b/src/ol/source/tilejson.exports @@ -0,0 +1 @@ +@exportSymbol ol.source.TileJSON From 576c54eb619d4cbb6adaa4a8cfd96251ec2639e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 24 Oct 2012 17:05:33 +0200 Subject: [PATCH 2/2] Move object literal exports to their own file --- Makefile | 18 ++++---- src/objectliterals.exports | 61 ++++++++++++++++++++++++++++ src/ol/control/attribution.exports | 4 -- src/ol/control/mouseposition.exports | 7 ---- src/ol/control/zoom.exports | 5 --- src/ol/layer/layer.exports | 9 ---- src/ol/map.exports | 26 ------------ src/ol/overlay/overlay.exports | 6 --- src/ol/source/bingmaps.exports | 5 --- 9 files changed, 70 insertions(+), 71 deletions(-) create mode 100644 src/objectliterals.exports delete mode 100644 src/ol/layer/layer.exports diff --git a/Makefile b/Makefile index ffc3468d43..0df21162a9 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ PHANTOMJS = phantomjs PLOVR_JAR = bin/plovr-b254c26318c5.jar SPEC = $(shell find test/spec -name \*.js) SRC = $(shell find externs src/ol -name \*.js) -EXPORTS = $(shell find src -name \*.exports) +EXPORTS = $(filter-out src/objectliterals.exports, $(shell find src -name \*.exports)) INTERNAL_SRC = \ build/src/internal/src/requireall.js \ build/src/internal/src/types.js @@ -41,25 +41,25 @@ build-all: build/ol-all.js build/ol-all.js: $(PLOVR_JAR) $(SRC) $(INTERNAL_SRC) base.json build/ol-all.json java -jar $(PLOVR_JAR) build build/ol-all.json >$@ || ( rm -f $@ ; false ) -build/src/external/externs/types.js: bin/generate-exports $(EXPORTS) +build/src/external/externs/types.js: bin/generate-exports src/objectliterals.exports mkdir -p $(dir $@) - bin/generate-exports --externs $(EXPORTS) >$@ || ( rm -f $@ ; false ) + bin/generate-exports --externs src/objectliterals.exports >$@ || ( rm -f $@ ; false ) -build/src/external/src/exports.js: bin/generate-exports $(EXPORTS) +build/src/external/src/exports.js: bin/generate-exports src/objectliterals.exports $(EXPORTS) mkdir -p $(dir $@) - bin/generate-exports --exports $(EXPORTS) >$@ || ( rm -f $@ ; false ) + bin/generate-exports --exports src/objectliterals.exports $(EXPORTS) >$@ || ( rm -f $@ ; false ) -build/src/external/src/types.js: bin/generate-exports $(EXPORTS) +build/src/external/src/types.js: bin/generate-exports src/objectliterals.exports mkdir -p $(dir $@) - bin/generate-exports --typedef $(EXPORTS) >$@ || ( rm -f $@ ; false ) + bin/generate-exports --typedef src/objectliterals.exports >$@ || ( rm -f $@ ; false ) build/src/internal/src/requireall.js: bin/generate-requireall $(SRC) mkdir -p $(dir $@) bin/generate-requireall --require=goog.dom src/ol >$@ || ( rm -f $@ ; false ) -build/src/internal/src/types.js: bin/generate-exports $(EXPORTS) +build/src/internal/src/types.js: bin/generate-exports src/objectliterals.exports mkdir -p $(dir $@) - bin/generate-exports --typedef $(EXPORTS) >$@ || ( rm -f $@ ; false ) + bin/generate-exports --typedef src/objectliterals.exports >$@ || ( rm -f $@ ; false ) .PHONY: build-examples build-examples: examples $(subst .html,.combined.js,$(EXAMPLES)) diff --git a/src/objectliterals.exports b/src/objectliterals.exports new file mode 100644 index 0000000000..bd7499907b --- /dev/null +++ b/src/objectliterals.exports @@ -0,0 +1,61 @@ +@exportObjectLiteral ol.control.AttributionOptions +@exportObjectLiteralProperty ol.control.AttributionOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.AttributionOptions.target Element|undefined + +@exportObjectLiteral ol.control.MousePositionOptions +@exportObjectLiteralProperty ol.control.MousePositionOptions.coordinateFormat ol.CoordinateFormatType|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.projection ol.Projection|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.target Element|undefined +@exportObjectLiteralProperty ol.control.MousePositionOptions.undefinedHtml string|undefined + +@exportObjectLiteral ol.control.ZoomOptions +@exportObjectLiteralProperty ol.control.ZoomOptions.delta number|undefined +@exportObjectLiteralProperty ol.control.ZoomOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.control.ZoomOptions.target Element|undefined + +@exportObjectLiteral ol.layer.LayerOptions +@exportObjectLiteralProperty ol.layer.LayerOptions.brightness number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.contrast number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.hue number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.opacity number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.saturation number|undefined +@exportObjectLiteralProperty ol.layer.LayerOptions.source ol.source.Source +@exportObjectLiteralProperty ol.layer.LayerOptions.visible boolean|undefined + +@exportObjectLiteral ol.MapOptions +@exportObjectLiteralProperty ol.MapOptions.center ol.Coordinate|undefined +@exportObjectLiteralProperty ol.MapOptions.controls ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.doubleClickZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.dragPan boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.interactions ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.keyboard boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.keyboardPanOffset number|undefined +@exportObjectLiteralProperty ol.MapOptions.layers ol.Collection|undefined +@exportObjectLiteralProperty ol.MapOptions.maxResolution number|undefined +@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoomDelta number|undefined +@exportObjectLiteralProperty ol.MapOptions.numZoomLevels number|undefined +@exportObjectLiteralProperty ol.MapOptions.projection ol.Projection|string|undefined +@exportObjectLiteralProperty ol.MapOptions.renderer ol.RendererHint|undefined +@exportObjectLiteralProperty ol.MapOptions.renderers Array.|undefined +@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined +@exportObjectLiteralProperty ol.MapOptions.resolutions Array.|undefined +@exportObjectLiteralProperty ol.MapOptions.rotate boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.shiftDragZoom boolean|undefined +@exportObjectLiteralProperty ol.MapOptions.target Element|string +@exportObjectLiteralProperty ol.MapOptions.userProjection ol.Projection|string|undefined +@exportObjectLiteralProperty ol.MapOptions.zoom number|undefined +@exportObjectLiteralProperty ol.MapOptions.zoomDelta number|undefined +@exportObjectLiteralProperty ol.MapOptions.zoomFactor number|undefined + +@exportObjectLiteral ol.overlay.OverlayOptions +@exportObjectLiteralProperty ol.overlay.OverlayOptions.coordinate ol.Coordinate|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.element Element|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.map ol.Map|undefined +@exportObjectLiteralProperty ol.overlay.OverlayOptions.positioning Array.|undefined + +@exportObjectLiteral ol.source.BingMapsOptions +@exportObjectLiteralProperty ol.source.BingMapsOptions.culture string|undefined +@exportObjectLiteralProperty ol.source.BingMapsOptions.key string +@exportObjectLiteralProperty ol.source.BingMapsOptions.style ol.BingMapsStyle diff --git a/src/ol/control/attribution.exports b/src/ol/control/attribution.exports index 4de1ec0276..961219fc9d 100644 --- a/src/ol/control/attribution.exports +++ b/src/ol/control/attribution.exports @@ -1,6 +1,2 @@ -@exportObjectLiteral ol.control.AttributionOptions -@exportObjectLiteralProperty ol.control.AttributionOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.AttributionOptions.target Element|undefined - @exportClass ol.control.Attribution ol.control.AttributionOptions diff --git a/src/ol/control/mouseposition.exports b/src/ol/control/mouseposition.exports index b36932efc9..7a4856fcb5 100644 --- a/src/ol/control/mouseposition.exports +++ b/src/ol/control/mouseposition.exports @@ -1,9 +1,2 @@ -@exportObjectLiteral ol.control.MousePositionOptions -@exportObjectLiteralProperty ol.control.MousePositionOptions.coordinateFormat ol.CoordinateFormatType|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.projection ol.Projection|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.target Element|undefined -@exportObjectLiteralProperty ol.control.MousePositionOptions.undefinedHtml string|undefined - @exportClass ol.control.MousePosition ol.control.MousePositionOptions diff --git a/src/ol/control/zoom.exports b/src/ol/control/zoom.exports index 1121653649..1a1835cffb 100644 --- a/src/ol/control/zoom.exports +++ b/src/ol/control/zoom.exports @@ -1,7 +1,2 @@ -@exportObjectLiteral ol.control.ZoomOptions -@exportObjectLiteralProperty ol.control.ZoomOptions.delta number|undefined -@exportObjectLiteralProperty ol.control.ZoomOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.control.ZoomOptions.target Element|undefined - @exportClass ol.control.Zoom ol.control.ZoomOptions diff --git a/src/ol/layer/layer.exports b/src/ol/layer/layer.exports deleted file mode 100644 index abcaeb62c3..0000000000 --- a/src/ol/layer/layer.exports +++ /dev/null @@ -1,9 +0,0 @@ -@exportObjectLiteral ol.layer.LayerOptions -@exportObjectLiteralProperty ol.layer.LayerOptions.brightness number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.contrast number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.hue number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.opacity number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.saturation number|undefined -@exportObjectLiteralProperty ol.layer.LayerOptions.source ol.source.Source -@exportObjectLiteralProperty ol.layer.LayerOptions.visible boolean|undefined - diff --git a/src/ol/map.exports b/src/ol/map.exports index 63ffc10366..b2f70f549b 100644 --- a/src/ol/map.exports +++ b/src/ol/map.exports @@ -1,29 +1,3 @@ -@exportObjectLiteral ol.MapOptions -@exportObjectLiteralProperty ol.MapOptions.center ol.Coordinate|undefined -@exportObjectLiteralProperty ol.MapOptions.controls ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.doubleClickZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.dragPan boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.interactions ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.keyboard boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.keyboardPanOffset number|undefined -@exportObjectLiteralProperty ol.MapOptions.layers ol.Collection|undefined -@exportObjectLiteralProperty ol.MapOptions.maxResolution number|undefined -@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.mouseWheelZoomDelta number|undefined -@exportObjectLiteralProperty ol.MapOptions.numZoomLevels number|undefined -@exportObjectLiteralProperty ol.MapOptions.projection ol.Projection|string|undefined -@exportObjectLiteralProperty ol.MapOptions.renderer ol.RendererHint|undefined -@exportObjectLiteralProperty ol.MapOptions.renderers Array.|undefined -@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined -@exportObjectLiteralProperty ol.MapOptions.resolutions Array.|undefined -@exportObjectLiteralProperty ol.MapOptions.rotate boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.shiftDragZoom boolean|undefined -@exportObjectLiteralProperty ol.MapOptions.target Element|string -@exportObjectLiteralProperty ol.MapOptions.userProjection ol.Projection|string|undefined -@exportObjectLiteralProperty ol.MapOptions.zoom number|undefined -@exportObjectLiteralProperty ol.MapOptions.zoomDelta number|undefined -@exportObjectLiteralProperty ol.MapOptions.zoomFactor number|undefined - @exportClass ol.Map ol.MapOptions @exportProperty ol.Map.prototype.getControls @exportProperty ol.Map.prototype.getInteractions diff --git a/src/ol/overlay/overlay.exports b/src/ol/overlay/overlay.exports index e902799d03..b60b8a16a0 100644 --- a/src/ol/overlay/overlay.exports +++ b/src/ol/overlay/overlay.exports @@ -1,9 +1,3 @@ -@exportObjectLiteral ol.overlay.OverlayOptions -@exportObjectLiteralProperty ol.overlay.OverlayOptions.coordinate ol.Coordinate|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.element Element|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.map ol.Map|undefined -@exportObjectLiteralProperty ol.overlay.OverlayOptions.positioning Array.|undefined - @exportClass ol.overlay.Overlay ol.overlay.OverlayOptions @exportProperty ol.overlay.Overlay.prototype.getElement @exportProperty ol.overlay.Overlay.prototype.setCoordinate diff --git a/src/ol/source/bingmaps.exports b/src/ol/source/bingmaps.exports index 7bec9b3194..516bf8777c 100644 --- a/src/ol/source/bingmaps.exports +++ b/src/ol/source/bingmaps.exports @@ -5,8 +5,3 @@ @exportProperty ol.BingMapsStyle.ROAD @exportProperty ol.BingMapsStyle.ORDNANCE_SURVEY @exportProperty ol.BingMapsStyle.COLLINS_BART -@exportObjectLiteral ol.source.BingMapsOptions -@exportObjectLiteralProperty ol.source.BingMapsOptions.culture string|undefined -@exportObjectLiteralProperty ol.source.BingMapsOptions.key string -@exportObjectLiteralProperty ol.source.BingMapsOptions.style ol.BingMapsStyle -