Add initial exports

This commit is contained in:
Tom Payne
2012-09-24 16:58:18 +02:00
parent d7c6ce19a9
commit b7020750ac
7 changed files with 80 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
PLOVR_JAR = bin/plovr-4b3caf2b7d84.jar
SRC = $(shell find externs src/ol -name \*.js)
SRC = $(shell find exports externs src/ol -name \*.js)
TARGETS = $(shell find demos -name advanced-optimizations.js -o -name simple-optimizations.js)
comma := ,
empty :=

View File

@@ -4,7 +4,14 @@
"inherits": "../base.json",
"inputs": "build/ol-all.js",
"inputs": [
"build/ol-all.js",
"exports/ol/collection.js",
"exports/ol/coordinate.js",
"exports/ol/extent.js",
"exports/ol/object.js",
"exports/ol/projection.js"
],
"output-wrapper": "(function(){%output%})();"

23
exports/ol/collection.js Normal file
View File

@@ -0,0 +1,23 @@
goog.require('ol.Collection');
goog.exportSymbol('ol.Collection', ol.Collection);
goog.exportProperty(ol.Collection.prototype,
'clear', ol.Collection.prototype.clear);
goog.exportProperty(ol.Collection.prototype,
'forEach', ol.Collection.prototype.forEach);
goog.exportProperty(ol.Collection.prototype,
'getArray', ol.Collection.prototype.getArray);
goog.exportProperty(ol.Collection.prototype,
'getAt', ol.Collection.prototype.getAt);
goog.exportProperty(ol.Collection.prototype,
'getLength', ol.Collection.prototype.getLength);
goog.exportProperty(ol.Collection.prototype,
'insertAt', ol.Collection.prototype.insertAt);
goog.exportProperty(ol.Collection.prototype,
'pop', ol.Collection.prototype.pop);
goog.exportProperty(ol.Collection.prototype,
'push', ol.Collection.prototype.push);
goog.exportProperty(ol.Collection.prototype,
'removeAt', ol.Collection.prototype.removeAt);
goog.exportProperty(ol.Collection.prototype,
'setAt', ol.Collection.prototype.setAt);

5
exports/ol/coordinate.js Normal file
View File

@@ -0,0 +1,5 @@
goog.require('ol.Coordinate');
goog.exportSymbol('ol.Coordinate', ol.Coordinate);
goog.exportProperty(ol.Coordinate.prototype,
'clone', ol.Coordinate.prototype.clone);

5
exports/ol/extent.js Normal file
View File

@@ -0,0 +1,5 @@
goog.require('ol.Extent');
goog.exportSymbol('ol.Extent', ol.Extent);
goog.exportProperty(ol.Extent.prototype,
'clone', ol.Extent.prototype.clone);

21
exports/ol/object.js Normal file
View File

@@ -0,0 +1,21 @@
goog.require('ol.Object');
goog.exportSymbol('ol.Object', ol.Object);
goog.exportProperty(ol.Object.prototype,
'bindTo', ol.Object.prototype.bindTo);
goog.exportProperty(ol.Object.prototype,
'changed', ol.Object.prototype.changed);
goog.exportProperty(ol.Object.prototype,
'get', ol.Object.prototype.get);
goog.exportProperty(ol.Object.prototype,
'notify', ol.Object.prototype.notify);
goog.exportProperty(ol.Object.prototype,
'set', ol.Object.prototype.set);
goog.exportProperty(ol.Object.prototype,
'setOptions', ol.Object.prototype.setOptions);
goog.exportProperty(ol.Object.prototype,
'setValues', ol.Object.prototype.setValues);
goog.exportProperty(ol.Object.prototype,
'unbind', ol.Object.prototype.unbind);
goog.exportProperty(ol.Object.prototype,
'unbindAll', ol.Object.prototype.unbindAll);

17
exports/ol/projection.js Normal file
View File

@@ -0,0 +1,17 @@
goog.require('ol.Projection');
goog.exportSymbol('ol.Projection', ol.Projection);
goog.exportProperty(ol.Projection,
'getFromCode', ol.Projection.getFromCode);
goog.exportProperty(ol.Projection,
'getTransform', ol.Projection.getTransform);
goog.exportProperty(ol.Projection,
'getTransformFromCodes', ol.Projection.getTransformFromCodes);
goog.exportProperty(ol.Projection,
'transform', ol.Projection.transform);
goog.exportProperty(ol.Projection.prototype,
'getCode', ol.Projection.prototype.getCode);
goog.exportProperty(ol.Projection.prototype,
'getExtent', ol.Projection.prototype.getExtent);
goog.exportProperty(ol.Projection.prototype,
'getUnits', ol.Projection.prototype.getUnits);