This pull requests replaces type check hint assertions with type casts,
library sanity check assertions with conditional console.assert statements
in debug mode, and runtime sanity checks with assertions that throw an
ol.AssertionError with an error code for lookup outside the library.
If ol3 is included as part of a concatenated build and the script before it does
not end in a semi-colon, the IIFE is interpreted incorrectly (often resulting in
`TypeError: (intermediate value)`).
The reporter for the standard tests is still 'spec'; the one for the
gathering of code coverage is set to 'dot' to not clutter the output
of the logfile on travis.
Now that https://github.com/laurentj/slimerjs/issues/333 is properly fixed (see 911fcb671a) we can no longer read Slimer's exit code from a file. Instead, we can just use the process exit code, which simplifies the test-rendering.js script.
This fixes issues with ol.source.Vector being unable to use ol.ext.rbush,
but it also means that potential future external modules without node
module loader support will not work. If we ever depend on such a module,
we can replace "var define;" with a minimal AMD define shim.
This is to be able to use the dev server (`npm start`) to serve the hosted examples (located in the `build/hosted/<branch>` dir after `make host-examples`).
Change generate-requires.js to use the graceful-fs module instead of fs. This is to avoid EMFILE errors on OSX because the maximum number of file descriptors have been reached.