diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d813ba7ea5..79b7cbb952 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -122,13 +122,7 @@ executing the `host-examples` build target:
After running `host-examples` you can now open the examples index page in the browser, for example: . (This assumes that the `hosted` directory is a web directory, served by Apache for example.)
-To make an example use `ol-simple.js` or `ol-whitespace.js` instead of `ol.js`
-append `?mode=simple` or `?mode=whitespace` to the example URL.
-
-Append `?mode=debug` or `?mode=raw` to make the example work in full debug mode. In
-full debug mode the OpenLayers and Closure Library scripts are loaded individually by
-the Closure Library's `base.js` script (which the example page loads and
-executes before any other script).
+Append `?mode=raw` to make the example work in full debug mode. In raw mode the OpenLayers and Closure Library scripts are loaded individually by the Closure Library's `base.js` script (which the example page loads and executes before any other script).
## Running tests
diff --git a/bin/loader_hosted_examples.js b/bin/loader_hosted_examples.js
index d5dda87429..46b07bd0c8 100644
--- a/bin/loader_hosted_examples.js
+++ b/bin/loader_hosted_examples.js
@@ -5,9 +5,9 @@
* This loader is used for the hosted examples. It is used in place of the
* development loader (examples/loader.js).
*
- * ol.js, ol-simple.js, ol-whitespace.js, and ol-deps.js are built
- * by OL3's build.py script. They are located in the ../build/ directory,
- * relatively to this script.
+ * The ol.js, ol-debug.js, and ol-deps.js scripts are built by OL3's
+ * build.py script. They are located in the ../build/ directory, relative to
+ * this script.
*
* The script must be named loader.js.
*
@@ -54,20 +54,11 @@
}
}
- var oljs = 'ol.js', mode;
- if ('mode' in pageParams) {
- mode = pageParams.mode.toLowerCase();
- if (mode == 'debug') {
- mode = 'raw';
- }
- if (mode != 'advanced' && mode != 'raw') {
- oljs = 'ol-' + mode + '.js';
- }
- }
+ var raw = pageParams.mode && pageParams.mode.toLowerCase() === 'raw';
var scriptId = encodeURIComponent(scriptParams.id);
- if (mode != 'raw') {
- document.write('');
+ if (!raw) {
+ document.write('');
} else {
window.CLOSURE_NO_DEPS = true; // we've got our own deps file
document.write('');
diff --git a/build.py b/build.py
index 3aa65c1593..ac2e383607 100755
--- a/build.py
+++ b/build.py
@@ -123,15 +123,14 @@ def report_sizes(t):
virtual('default', 'build')
-virtual('ci', 'lint', 'jshint', 'build', 'build-all',
- 'test', 'build/examples/all.combined.js', 'check-examples', 'apidoc')
+virtual('ci', 'lint', 'jshint', 'build', 'test',
+ 'build/examples/all.combined.js', 'check-examples', 'apidoc')
-virtual('build', 'build/ol.css', 'build/ol.js',
- 'build/ol-simple.js', 'build/ol-whitespace.js')
+virtual('build', 'build/ol.css', 'build/ol.js', 'build/ol-debug.js')
-virtual('check', 'lint', 'jshint', 'build/ol-all.js', 'test')
+virtual('check', 'lint', 'jshint', 'test')
virtual('todo', 'fixme')
@@ -148,26 +147,12 @@ def build_ol_new_js(t):
report_sizes(t)
-@target('build/ol-simple.js', SRC, SHADER_SRC, 'buildcfg/ol-simple.json')
-def build_ol_simple_js(t):
- t.run('node', 'tasks/build.js', 'buildcfg/ol-simple.json', 'build/ol-simple.js')
+@target('build/ol-debug.js', SRC, SHADER_SRC, 'buildcfg/ol-debug.json')
+def build_ol_debug_js(t):
+ t.run('node', 'tasks/build.js', 'buildcfg/ol-debug.json', 'build/ol-debug.js')
report_sizes(t)
-@target('build/ol-whitespace.js', SRC, SHADER_SRC, 'buildcfg/ol-whitespace.json')
-def build_ol_whitespace_js(t):
- t.run('node', 'tasks/build.js', 'buildcfg/ol-whitespace.json', 'build/ol-whitespace.js')
- report_sizes(t)
-
-
-virtual('build-all', 'build/ol-all.js')
-
-
-@target('build/ol-all.js', SRC, SHADER_SRC, 'buildcfg/ol-all.json')
-def build_ol_all_js(t):
- t.run('node', 'tasks/build.js', 'buildcfg/ol-all.json', 'build/ol-all.js')
-
-
for glsl_src in GLSL_SRC:
def shader_src_helper(glsl_src):
@target(glsl_src.replace('.glsl', 'shader.js'), glsl_src,
@@ -609,8 +594,7 @@ def host_examples(t):
split_example_file(example, examples_dir % vars(variables))
t.cp_r('examples/data', examples_dir + '/data')
t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js')
- t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js',
- build_dir)
+ t.cp('build/ol.js', 'build/ol-debug.js', build_dir)
t.cp('build/ol.css', css_dir)
t.cp('examples/index.html', 'examples/example-list.js',
'examples/example-list.xml', 'examples/Jugl.js',
diff --git a/buildcfg/ol-all.json b/buildcfg/ol-all.json
deleted file mode 100644
index ed2b98497f..0000000000
--- a/buildcfg/ol-all.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "exports": ["*"],
- "compile": {
- "externs": [
- "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",
- "externs/vbarray.js"
- ],
- "define": [
- "goog.dom.ASSUME_STANDARDS_MODE=true",
- "goog.DEBUG=false"
- ],
- "jscomp_error": [
- "accessControls",
- "ambiguousFunctionDecl",
- "checkEventfulObjectDisposal",
- "checkRegExp",
- "checkStructDictInheritance",
- "checkTypes",
- "checkVars",
- "const",
- "constantProperty",
- "deprecated",
- "duplicateMessage",
- "es3",
- "externsValidation",
- "fileoverviewTags",
- "globalThis",
- "internetExplorerChecks",
- "invalidCasts",
- "misplacedTypeAnnotation",
- "missingGetCssName",
- "missingProperties",
- "missingProvide",
- "missingRequire",
- "missingReturn",
- "newCheckTypes",
- "nonStandardJsDocs",
- "suspiciousCode",
- "strictModuleDepCheck",
- "typeInvalidation",
- "undefinedNames",
- "undefinedVars",
- "unknownDefines",
- "uselessCode",
- "visibility"
- ],
- "extra_annotation_name": [
- "api", "observable"
- ],
- "jscomp_off": [
- "es5Strict"
- ],
- "compilation_level": "ADVANCED",
- "output_wrapper": "// OpenLayers 3. See http://ol3.js.org/\n(function(){%output%})();",
- "use_types_for_optimization": true
- }
-}
diff --git a/buildcfg/ol-debug.json b/buildcfg/ol-debug.json
new file mode 100644
index 0000000000..b8f37e2ff1
--- /dev/null
+++ b/buildcfg/ol-debug.json
@@ -0,0 +1,3 @@
+{
+ "exports": ["*"]
+}
diff --git a/buildcfg/ol-simple.json b/buildcfg/ol-simple.json
deleted file mode 100644
index 0ceab0554c..0000000000
--- a/buildcfg/ol-simple.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "exports": ["*"],
- "compile": {
- "externs": [
- "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",
- "externs/vbarray.js"
- ],
- "define": [
- "goog.dom.ASSUME_STANDARDS_MODE=true",
- "goog.DEBUG=false"
- ],
- "jscomp_error": [
- "accessControls",
- "ambiguousFunctionDecl",
- "checkEventfulObjectDisposal",
- "checkRegExp",
- "checkStructDictInheritance",
- "checkTypes",
- "checkVars",
- "const",
- "constantProperty",
- "deprecated",
- "duplicateMessage",
- "es3",
- "externsValidation",
- "fileoverviewTags",
- "globalThis",
- "internetExplorerChecks",
- "invalidCasts",
- "misplacedTypeAnnotation",
- "missingGetCssName",
- "missingProperties",
- "missingProvide",
- "missingRequire",
- "missingReturn",
- "newCheckTypes",
- "nonStandardJsDocs",
- "suspiciousCode",
- "strictModuleDepCheck",
- "typeInvalidation",
- "undefinedNames",
- "undefinedVars",
- "unknownDefines",
- "uselessCode",
- "visibility"
- ],
- "extra_annotation_name": [
- "api", "observable"
- ],
- "jscomp_off": [
- "es5Strict"
- ],
- "compilation_level": "SIMPLE",
- "output_wrapper": "%output%",
- "use_types_for_optimization": false,
- "manage_closure_dependencies": true
- }
-}
diff --git a/buildcfg/ol-whitespace.json b/buildcfg/ol-whitespace.json
deleted file mode 100644
index e2a04cf611..0000000000
--- a/buildcfg/ol-whitespace.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "exports": ["*"],
- "compile": {
- "externs": [
- "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",
- "externs/vbarray.js"
- ],
- "define": [
- "goog.dom.ASSUME_STANDARDS_MODE=true",
- "goog.DEBUG=false"
- ],
- "jscomp_error": [
- "accessControls",
- "ambiguousFunctionDecl",
- "checkEventfulObjectDisposal",
- "checkRegExp",
- "checkStructDictInheritance",
- "checkTypes",
- "checkVars",
- "const",
- "constantProperty",
- "deprecated",
- "duplicateMessage",
- "es3",
- "externsValidation",
- "fileoverviewTags",
- "globalThis",
- "internetExplorerChecks",
- "invalidCasts",
- "misplacedTypeAnnotation",
- "missingGetCssName",
- "missingProperties",
- "missingProvide",
- "missingRequire",
- "missingReturn",
- "newCheckTypes",
- "nonStandardJsDocs",
- "suspiciousCode",
- "strictModuleDepCheck",
- "typeInvalidation",
- "undefinedNames",
- "undefinedVars",
- "unknownDefines",
- "uselessCode",
- "visibility"
- ],
- "extra_annotation_name": [
- "api", "observable"
- ],
- "jscomp_off": [
- "es5Strict"
- ],
- "compilation_level": "WHITESPACE_ONLY",
- "output_wrapper": "var CLOSURE_DEPS = false;\n%output%",
- "use_types_for_optimization": false,
- "manage_closure_dependencies": true
- }
-}