Use externs/olx.js instead of objectliterals.jsdoc
The single externs/olx.js file describes all of the "options" objects we accept in our constructors. The @typedef annotations are used by the compiler for type checking. The @type annotations include documentation for individual options and serve as externs when compiling a profile of the library. When compiling an application together with the library, the externs/olx.js file is included as one of the sources to provide the @typedef's without generating externs. If we want to maintain multiple src/*.externs.js files instead of one large externs/olx.js file, we can. But while we are still using Plovr, it makes for easier build configurations to have one file. This removes the build tasks that generated the build/src/external/src/externs/types.js and build/src/internal/src/types.js files as those are both replaced by the single externs/olx.js file.
This commit is contained in:
32
build.py
32
build.py
@@ -90,9 +90,7 @@ EXPORTS = [path
|
||||
for path in ifind('src')
|
||||
if path.endswith('.exports')]
|
||||
|
||||
EXTERNAL_SRC = [
|
||||
'build/src/external/externs/types.js',
|
||||
'build/src/external/src/exports.js']
|
||||
EXTERNAL_SRC = ['build/src/external/src/exports.js']
|
||||
|
||||
EXAMPLES = [path
|
||||
for path in ifind('examples')
|
||||
@@ -115,9 +113,7 @@ EXAMPLES_JSON = ['build/' + example.replace('.html', '.json')
|
||||
EXAMPLES_COMBINED = ['build/' + example.replace('.html', '.combined.js')
|
||||
for example in EXAMPLES]
|
||||
|
||||
INTERNAL_SRC = [
|
||||
'build/src/internal/src/requireall.js',
|
||||
'build/src/internal/src/types.js']
|
||||
INTERNAL_SRC = ['build/src/internal/src/requireall.js']
|
||||
|
||||
GLSL_SRC = [path
|
||||
for path in ifind('src')
|
||||
@@ -223,18 +219,9 @@ def build_ol_all_js(t):
|
||||
PLOVR_JAR, 'build', 'buildcfg/ol-all.json')
|
||||
|
||||
|
||||
@target('build/src/external/externs/types.js', 'bin/generate-exports.py',
|
||||
'src/objectliterals.jsdoc')
|
||||
def build_src_external_externs_types_js(t):
|
||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
||||
'--externs', 'src/objectliterals.jsdoc')
|
||||
|
||||
|
||||
@target('build/src/external/src/exports.js', 'bin/generate-exports.py',
|
||||
'src/objectliterals.jsdoc', EXPORTS)
|
||||
@target('build/src/external/src/exports.js', 'bin/generate-exports.py', EXPORTS)
|
||||
def build_src_external_src_exports_js(t):
|
||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
||||
'--exports', 'src/objectliterals.jsdoc', EXPORTS)
|
||||
t.output('%(PYTHON)s', 'bin/generate-exports.py', '--exports', EXPORTS)
|
||||
|
||||
|
||||
for glsl_src in GLSL_SRC:
|
||||
@@ -272,13 +259,6 @@ def build_test_requireall_js(t):
|
||||
_build_require_list(t.dependencies, t.name)
|
||||
|
||||
|
||||
@target('build/src/internal/src/types.js', 'bin/generate-exports.py',
|
||||
'src/objectliterals.jsdoc')
|
||||
def build_src_internal_types_js(t):
|
||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
||||
'--typedef', 'src/objectliterals.jsdoc')
|
||||
|
||||
|
||||
virtual('build-examples', 'examples', 'build/examples/all.combined.js',
|
||||
EXAMPLES_COMBINED)
|
||||
|
||||
@@ -318,7 +298,7 @@ def examples_star_json(name, match):
|
||||
'inherits': '../../buildcfg/base.json',
|
||||
'inputs': [
|
||||
'../examples/%(id)s.js' % match.groupdict(),
|
||||
'../build/src/internal/src/types.js',
|
||||
'../externs/olx.js',
|
||||
],
|
||||
'externs': [
|
||||
'//jquery-1.7.js',
|
||||
@@ -386,7 +366,7 @@ def build_lint_src_timestamp(t):
|
||||
def build_lint_generated_timestamp(t):
|
||||
limited_doc_files = [
|
||||
path
|
||||
for path in ifind('externs', 'build/src/external/externs')
|
||||
for path in ifind('externs')
|
||||
if path.endswith('.js')]
|
||||
t.run('%(GJSLINT)s',
|
||||
'--jslint_error=all',
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
"../externs/closure-compiler.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/olx.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js",
|
||||
"../externs/topojson.js",
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
"inherits": "base.json",
|
||||
"inputs": [
|
||||
"../build/examples/all.js",
|
||||
"../build/src/internal/src/types.js"
|
||||
"../externs/olx.js"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
"id": "ol-all",
|
||||
|
||||
"externs": [
|
||||
"../build/src/external/externs/types.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/closure-compiler.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/olx.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js",
|
||||
"../externs/topojson.js",
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
"id": "ol-simple",
|
||||
|
||||
"externs": [
|
||||
"../build/src/external/externs/types.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/closure-compiler.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/olx.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js",
|
||||
"../externs/topojson.js",
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"../externs/closure-compiler.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/olx.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js",
|
||||
"../externs/topojson.js",
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
"css-output-file": "../build/ol.css",
|
||||
|
||||
"externs": [
|
||||
"../build/src/external/externs/types.js",
|
||||
"../externs/bingmaps.js",
|
||||
"../externs/closure-compiler.js",
|
||||
"../externs/geojson.js",
|
||||
"../externs/oli.js",
|
||||
"../externs/olx.js",
|
||||
"../externs/proj4js.js",
|
||||
"../externs/tilejson.js",
|
||||
"../externs/topojson.js",
|
||||
|
||||
4724
externs/olx.js
Normal file
4724
externs/olx.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user