Skip to content

Instantly share code, notes, and snippets.

@cbonnissent
Last active March 3, 2016 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbonnissent/37030a5f90f08377a8b4 to your computer and use it in GitHub Desktop.
Save cbonnissent/37030a5f90f08377a8b4 to your computer and use it in GitHub Desktop.
(function amdRequire(root, factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define([
'jquery',
'underscore',
'mustache',
'deps1',
'deps2'
], factory);
} else {
var $defer = jQuery.Deferred();
window.dcp.deps3 = $defer;
$.when(
window.dcp.deps1,
window.dcp.deps2
).done(function initBase(deps1, deps2) {
//noinspection JSUnresolvedVariable
$defer.resolve(factory(window.jQuery, window._, window.Mustache, deps1, deps2));
});
}
}(window, function registerCriterias($, _, Mustache, deps1, deps2) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment