Permalink
Browse files

Merge git://github.com/dvv/transporter

  • Loading branch information...
2 parents b23b111 + 0ef70f4 commit 43bf3681c953bcef7b622335d590139eca9674bb @kriszyp committed Jul 29, 2010
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/jsgi/transporter.js
View
@@ -21,15 +21,15 @@ exports.Transporter = function(options, app) {
},
autoRun = "autoRun" in options ? options.autoRun : true,
excluded = {};
- converter = options.converter || exports.CommonJS;
-
+ converter = options.converter || exports.CommonJS;
+
excludeModules.forEach(function(moduleId){
excluded[moduleId] = true;
});
return function(request) {
var modules, isPaused, path = request.pathInfo;
if(path.indexOf(prefix) != 0){
- if(app){
+ if(app){
return app(request);
}
return {
@@ -128,9 +128,9 @@ exports.Transporter = function(options, app) {
return true;
}
if(moduleName === "require"){
- // require.js loads the require handler, which can't be embedded in
+ // require.js loads the require handler, which can't be embedded in
// require.def because require doesn't exist yet
- // also hand-coded modules that define their require.def's don't need wrapping/resolution,
+ // also hand-coded modules that define their require.def's don't need wrapping/resolution,
// they can be directly written
var baseUrl = request.pathInfo.substring(0, request.pathInfo.lastIndexOf("/") + 1);
// we set the base url in the require config so that it knows where to load from
@@ -139,10 +139,10 @@ exports.Transporter = function(options, app) {
return true;
}
if(excluded[moduleName] || fileContents.indexOf("require.def(") > -1){
- // also hand-coded modules that define their require.def's don't need wrapping/resolution,
+ // also hand-coded modules that define their require.def's don't need wrapping/resolution,
// they can be directly written
write(fileContents);
- return true;
+ return true;
}
converter(moduleName, fileContents, resolveDeps ? loadModule : function(){ return true;}, modules, write);
modules[moduleName] = 2; // finished
@@ -309,4 +309,4 @@ exports.DojoRequireJS = function(moduleName, fileContents, loadModule, modules,
write(fileContents);
write('\n});\n');
}
-};
+};

0 comments on commit 43bf368

Please sign in to comment.