Advanced compilation of the API with 'bin/ol api'
This commit is contained in:
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"id": "api",
|
||||||
|
|
||||||
|
"output-file": "api.js",
|
||||||
|
|
||||||
|
"inputs": "src/ol.export.js",
|
||||||
|
"paths": [
|
||||||
|
"src"
|
||||||
|
],
|
||||||
|
|
||||||
|
"define": {
|
||||||
|
// "goog.dom.ASSUME_STANDARDS_MODE": true,
|
||||||
|
// "goog.userAgent.ASSUME_MOBILE_WEBKIT": true,
|
||||||
|
"goog.DEBUG": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"mode": "ADVANCED",
|
||||||
|
"level": "VERBOSE",
|
||||||
|
// "pretty-print": true,
|
||||||
|
// "debug": true,
|
||||||
|
|
||||||
|
// "experimental-compiler-options": {
|
||||||
|
// "generateExports": true
|
||||||
|
// },
|
||||||
|
|
||||||
|
|
||||||
|
"checks": {
|
||||||
|
// acceptable values are "ERROR", "WARNING", and "OFF"
|
||||||
|
"accessControls": "WARNING",
|
||||||
|
"visibility": "WARNING",
|
||||||
|
"checkTypes": "WARNING",
|
||||||
|
"checkRegExp": "WARNING",
|
||||||
|
"checkVars": "WARNING",
|
||||||
|
"deprecated": "WARNING",
|
||||||
|
"fileoverviewTags": "WARNING",
|
||||||
|
"invalidCasts": "WARNING",
|
||||||
|
"missingProperties": "WARNING",
|
||||||
|
"nonStandardJsDocs": "WARNING",
|
||||||
|
"undefinedVars": "WARNING"
|
||||||
|
},
|
||||||
|
|
||||||
|
"jsdoc-html-output-path": "jsdoc"
|
||||||
|
}
|
||||||
+10
-1
@@ -8,12 +8,14 @@
|
|||||||
<property name="ol.home" location=".."/>
|
<property name="ol.home" location=".."/>
|
||||||
<property name="plovr.jar" location="${ol.home}/bin/plovr.jar"/>
|
<property name="plovr.jar" location="${ol.home}/bin/plovr.jar"/>
|
||||||
<property name="main.json" location="${ol.home}/main.json"/>
|
<property name="main.json" location="${ol.home}/main.json"/>
|
||||||
|
<property name="api.json" location="${ol.home}/api.json"/>
|
||||||
|
|
||||||
<target name="usage">
|
<target name="usage">
|
||||||
<echo>
|
<echo>
|
||||||
Available commands:
|
Available commands:
|
||||||
|
|
||||||
serve - Run the library server
|
serve - Run the library server
|
||||||
|
api - Builds the optimized file with public api
|
||||||
doc - Build the reference docs
|
doc - Build the reference docs
|
||||||
</echo>
|
</echo>
|
||||||
</target>
|
</target>
|
||||||
@@ -33,6 +35,13 @@
|
|||||||
<arg value="${main.json}"/>
|
<arg value="${main.json}"/>
|
||||||
</java>
|
</java>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="api" depends="deps">
|
||||||
|
<java jar="${plovr.jar}" fork="true">
|
||||||
|
<arg value="build"/>
|
||||||
|
<arg value="${api.json}"/>
|
||||||
|
</java>
|
||||||
|
</target>
|
||||||
|
|
||||||
<target name="doc" depends="deps">
|
<target name="doc" depends="deps">
|
||||||
<java jar="${plovr.jar}" fork="true">
|
<java jar="${plovr.jar}" fork="true">
|
||||||
@@ -41,4 +50,4 @@
|
|||||||
</java>
|
</java>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
goog.require("ol.loc");
|
||||||
|
goog.require("ol.feature");
|
||||||
|
goog.require("ol.projection");
|
||||||
|
goog.require('ol.bounds');
|
||||||
|
goog.require("ol.map");
|
||||||
|
goog.require("ol.layer.xyz");
|
||||||
|
goog.require("ol.layer.osm");
|
||||||
|
|
||||||
|
// ol.map
|
||||||
|
goog.exportSymbol('ol.map', ol.map );
|
||||||
|
goog.exportSymbol('ol.Map', ol.Map );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'center', ol.Map.prototype.center );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'projection', ol.Map.prototype.projection );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'userProjection', ol.Map.prototype.userProjection );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'zoom', ol.Map.prototype.zoom );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'numZoomLevels', ol.Map.prototype.numZoomLevels );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'resolutions', ol.Map.prototype.resolutions );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'layers', ol.Map.prototype.layers );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'controls', ol.Map.prototype.controls );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'maxExtent', ol.Map.prototype.maxExtent );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'maxRes', ol.Map.prototype.maxRes );
|
||||||
|
goog.exportProperty( ol.Map.prototype, 'destroy', ol.Map.prototype.destroy );
|
||||||
|
|
||||||
|
// ol.loc
|
||||||
|
goog.exportSymbol('ol.loc', ol.loc );
|
||||||
|
goog.exportSymbol('ol.Loc', ol.Loc ); // This is not required only for the tests with isInstanceOf
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'projection', ol.Loc.prototype.projection );
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'x', ol.Loc.prototype.x );
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'y', ol.Loc.prototype.y );
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'z', ol.Loc.prototype.z );
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'transform', ol.Loc.prototype.transform );
|
||||||
|
goog.exportProperty( ol.Loc.prototype, 'destroy', ol.Loc.prototype.destroy );
|
||||||
|
|
||||||
|
// ol.projection
|
||||||
|
goog.exportSymbol('ol.projection', ol.projection );
|
||||||
|
goog.exportSymbol('ol.Projection', ol.Projection );
|
||||||
|
goog.exportProperty( ol.Projection.prototype, 'code', ol.Projection.prototype.code );
|
||||||
|
goog.exportProperty( ol.Projection.prototype, 'units', ol.Projection.prototype.units );
|
||||||
|
|
||||||
|
// ol.bounds
|
||||||
|
goog.exportSymbol('ol.bounds', ol.bounds );
|
||||||
|
goog.exportSymbol('ol.Bounds', ol.Bounds );
|
||||||
|
goog.exportProperty( ol.Bounds.prototype, 'projection', ol.Bounds.prototype.projection );
|
||||||
|
goog.exportProperty( ol.Bounds.prototype, 'minX', ol.Bounds.prototype.minX );
|
||||||
|
goog.exportProperty( ol.Bounds.prototype, 'minY', ol.Bounds.prototype.minY );
|
||||||
|
goog.exportProperty( ol.Bounds.prototype, 'maxX', ol.Bounds.prototype.maxX );
|
||||||
|
goog.exportProperty( ol.Bounds.prototype, 'maxY', ol.Bounds.prototype.maxY );
|
||||||
Reference in New Issue
Block a user