diff --git a/build/loader_hosted_examples.js b/build/loader_hosted_examples.js index 92cefa8e76..19c5d2ae04 100644 --- a/build/loader_hosted_examples.js +++ b/build/loader_hosted_examples.js @@ -1,17 +1,15 @@ /** - * * Loader to add ol.css, ol.js and the example-specific js file to the * documents. * * This loader is used for the hosted examples. It is used in place of the * development loader (examples/loader.js). * - * ol.css, ol.js, ol-simple.js, and ol-whitespace.js are built with - * Plovr/Closure. `build.py build` builds them. They are located in the - * ../build/ directory, relatively to this script. + * ol.css, 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 script should be named loader.js. So it needs to be renamed to - * loader.js from loader_hosted_examples.js. + * The script must be named loader.js. * * Usage: * @@ -59,17 +57,23 @@ var oljs = 'ol.js', mode; if ('mode' in pageParams) { mode = pageParams.mode.toLowerCase(); - if (mode != 'advanced') { + if (mode == 'debug') { + mode = 'raw'; + } + if (mode != 'advanced' && mode != 'raw') { oljs = 'ol-' + mode + '.js'; } } - document.write(''); - document.write('' + - ''); - document.write('' + - ''); + var scriptId = encodeURIComponent(scriptParams.id); + document.write(''); + if (mode != 'raw') { + document.write(''); + } else { + window.CLOSURE_NO_DEPS = true; // we've got our own deps file + document.write(''); + document.write(''); + document.write(''); + } + document.write(''); }());