build/define.js
function(moduleName, deps, callback) {
  //if (moduleName === "jquery/selector") { debugger; }
  if (!deps && !callback) {
    return;
  }

  // Allow deps to be optional.
  if (!callback && typeof deps === "function") {
    callback = deps;
    deps = undefined;
  }

  // Ensure dependencies is never falsey.
  deps = deps || [];

  // Normalize the dependencies.
  deps = deps.map(function(dep) {
    if (dep.indexOf("./") === -1) {
      return dep;
    }

    // Take off the last path.
    var normalize = moduleName.split("/").slice(0, -1).join("/");

    //console.log(normalize, dep, define.join(normalize, dep));
    return define.join(normalize, dep);
  });

  // Attach to the module map.
  define.map[moduleName] = {
    moduleName: moduleName,
    deps: deps,
    callback: callback
  };
}
function(moduleName, deps, callback) {
  //if (moduleName === "jquery/selector") { debugger; }
  if (!deps && !callback) {
    return;
  }

  // Allow deps to be optional.
  if (!callback && typeof deps === "function") {
    callback = deps;
    deps = undefined;
  }

  // Ensure dependencies is never falsey.
  deps = deps || [];

  // Normalize the dependencies.
  deps = deps.map(function(dep) {
    if (dep.indexOf("./") === -1) {
      return dep;
    }

    // Take off the last path.
    var normalize = moduleName.split("/").slice(0, -1).join("/");

    //console.log(normalize, dep, define.join(normalize, dep));
    return define.join(normalize, dep);
  });

  // Attach to the module map.
  define.map[moduleName] = {
    moduleName: moduleName,
    deps: deps,
    callback: callback
  };
}
function ( moduleName , deps , callback ) { //if (moduleName === "jquery/selector") { debugger; } if ( ! deps && ! callback ) { return ; } // Allow deps to be optional. if ( ! callback && typeof deps === "function" ) { callback = deps ; deps = undefined ; } // Ensure dependencies is never falsey. deps = deps || [ ] ; // Normalize the dependencies. deps = deps . map ( function ( dep ) { if ( dep . indexOf ( "./" ) === - 1 ) { return dep ; } // Take off the last path. var normalize = moduleName . split ( "/" ) . slice ( 0 , - 1 ) . join ( "/" ) ; //console.log(normalize, dep, define.join(normalize, dep)); return define . join ( normalize , dep ) ; } ) ; // Attach to the module map. define . map [ moduleName ] = { moduleName : moduleName , deps : deps , callback : callback } ; }
Register modules first, but do not execute the callbacks until a matching `require` has been requested for this module.
Register modules first but do not execute the callbacks until a matching require has been requested for this module .