jetfuel-blackbox
Version:
Currently, BlackBox is a boilerplate client-side application framework, built on top of the JetFuel build system and Grunt, Backbone, RequireJS, JetRunner unit test server (Mocha BDD/TDD test framework + PhantomJS + SauceLabs cloud integration), Dust (and Plate Django port) for templating (both client and server-side), Sass, Express dynamic web server, etc. BlackBox is the template used for JetFuel's basic `init` command.
21 lines (16 loc) • 599 B
JavaScript
define(function(){
'use strict';
return {
load : function(name, req, onLoad, config){
var modifiers, pluginName;
name = name.split('?');
modifiers = name.pop().split(',');
require([pluginName = modifiers[0]], function(plugin) {
plugin.load.call(plugin, name.pop().replace(
/^(\w)/,
(config.config[pluginName == 'css' ? 'css' : 'resource'].baseUrl + '$1')
) + (modifiers[1] == 'sync' ? '?sync' : ''), req, onLoad, config);
});
}
};
});