Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
19
gaia/apps/calendar/js/common/async_require.js
Executable file
19
gaia/apps/calendar/js/common/async_require.js
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
define(function(require, exports, module) {
|
||||
'use strict';
|
||||
|
||||
module.exports = function(ids) {
|
||||
if (!Array.isArray(ids)) {
|
||||
ids = [ids];
|
||||
}
|
||||
|
||||
// We want to find the "global" require that implements
|
||||
// https://github.com/amdjs/amdjs-api/wiki/require even though
|
||||
// it is not required by the amd spec nor is it implemented by all loaders.
|
||||
// First we'll try to find curl and then, if that doesn't work,
|
||||
// we'll try to find one that has require.toUrl().
|
||||
// Either way we want this to work in the app and also in unit tests.
|
||||
var requireFn = window.requirejs || window.require || require;
|
||||
return new Promise((resolve, reject) => requireFn(ids, resolve, reject));
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Reference in a new issue