Move object literal exports to their own file

This commit is contained in:
Éric Lemoine
2012-10-24 17:05:33 +02:00
parent d81b232587
commit 576c54eb61
9 changed files with 70 additions and 71 deletions

View File

@@ -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))

View File

@@ -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.<ol.RendererHint>|undefined
@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined
@exportObjectLiteralProperty ol.MapOptions.resolutions Array.<number>|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.<string>|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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.<ol.RendererHint>|undefined
@exportObjectLiteralProperty ol.MapOptions.resolution number|undefined
@exportObjectLiteralProperty ol.MapOptions.resolutions Array.<number>|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

View File

@@ -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.<string>|undefined
@exportClass ol.overlay.Overlay ol.overlay.OverlayOptions
@exportProperty ol.overlay.Overlay.prototype.getElement
@exportProperty ol.overlay.Overlay.prototype.setCoordinate

View File

@@ -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