* During build, error is printed out with stack and process exits
* During development, initial build behaves as above, however when
watching files, errors are displayed but watch process does not
exit allowing fixes without a complete rebuild.
(Travis might call this automatically before 'script', but we need it
before 'gulp build', and we don't want to do 'gulp build' in 'script',
because the output isn't relevant and if it fails there's no need to run
the tests.)
* Without this, preference change observers stack, triggering multiple
times if Zotero is re-initialized multiple times within the same
browser instance (like in tests)
* Use mocha, chai & sinon from the npm. As of sinon 2.0
sinon-as-promised is no longer required so it is removed
* Tweak code to re-use the same loader with the same environment
throghout the code
* Introduce browserify step for testing tools that only provide
node-compatible libraries (sinon, chai-as-promised)
* Introduce copy step for test data to resolve multiple issues with
tests depending on files not being symlinks
* Re-introduce custom implementation of setTimeout to resolve issues
with few tests
* Re-introduce custom Bluebird Promises config & monkey patch
* Add a multi-process, gulp-based build system to support es6 features,
async/await, jsx and scss
* Add a package.json to support dependency management and allow starting
the build process via npm
* Replace embedded Bluebird library with npm-installed one
* Add react, react-dom and web-library
* Introduce a custom require() loader in include.js as well as a minimal
local require() implementation in various other places
Previously, if an id was psased as a string and the id existed in the
cache, an error wouldn't be thrown, but if there id wasn't in the cache
(e.g., because it was in an unloaded library) it would. This requires an
integer in all cases.
Note that, among other things, any code that gets ids from object keys
will need to convert them to integers before passing to getAsync().