Skip to content

Instantly share code, notes, and snippets.

@jrburke
Created July 5, 2012 20:55
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 jrburke/3056350 to your computer and use it in GitHub Desktop.
Save jrburke/3056350 to your computer and use it in GitHub Desktop.
loading built test stuff
if (someConditionIsTrueFromQueryString) {
require(['testmain'], function () {
require(['test'], function (test) {
});
});
} else {
require(['test'], function (test) {
});
}
//This may work too, and is shorter
var priorities = [];
if (someConditionIsTrueFromQueryString) {
priorities.push('testmain');
}
require(priorities, function () {
require(['test'], function (test) {
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment