enhanced-require
Advanced tools
Comparing version 0.5.0-beta2 to 0.5.0-beta3
@@ -0,0 +0,0 @@ module.exports = { |
@@ -0,0 +0,0 @@ # simple-server |
@@ -0,0 +0,0 @@ var pageTemplate = require("./page.jade"); |
@@ -0,0 +0,0 @@ var http = require("http"); |
@@ -0,0 +0,0 @@ require("../../")(module, { |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ var RequireContext = require("./RequireContext"); |
@@ -0,0 +0,0 @@ var fs = require("fs"); |
@@ -47,2 +47,4 @@ var runInThisContext = require("vm").runInThisContext; | ||
Module.prototype._compile = function() { | ||
if(this.error) throw this.error; | ||
if(!this._source) throw new Error("No source availible"); | ||
var code = this._source.source(); | ||
@@ -49,0 +51,0 @@ var wrappedCode = "(function (exports, require, define, module, __filename, __dirname) {" + stripBOM(code) + "\n})"; |
@@ -0,0 +0,0 @@ /* |
@@ -0,0 +0,0 @@ /* |
@@ -62,4 +62,6 @@ var path = require("path"); | ||
this.context = path.dirname(parent.filename); | ||
} else if(parent.resource && parent.splitQuery) { | ||
} else if(parent.resource && parent.splitQuery && parent.resource[0] != "?") { | ||
this.context = path.dirname(parent.splitQuery(parent.resource)[0]); | ||
} else if(typeof root.main == "string") { | ||
this.context = root.main; | ||
} else if(root.main && root.main.filename) { | ||
@@ -66,0 +68,0 @@ this.context = path.dirname(root.main.filename); |
@@ -0,0 +0,0 @@ var path = require("path"); |
{ | ||
"name": "enhanced-require", | ||
"version": "0.5.0-beta2", | ||
"version": "0.5.0-beta3", | ||
"author": "Tobias Koppers @sokra", | ||
@@ -5,0 +5,0 @@ "description": "Enhance the require function in node.js with support for loaders which preprocess files and really async require (AMD). Enables Hot Code Replacement.", |
@@ -0,0 +0,0 @@ # enhanced-require |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
module.exports = 1; | ||
module.exports = { two: require("./circular2") }; |
module.exports = 2; | ||
module.exports = { one: require("./circular1") }; |
exports.module = module; | ||
exports.a = require("./graph/a.js"); | ||
exports.b = require("./graph/b.js"); |
module.exports = module; | ||
require("./b"); |
@@ -0,0 +0,0 @@ var list = []; |
@@ -0,0 +0,0 @@ var list = []; |
@@ -0,0 +0,0 @@ var list = []; |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
@@ -0,0 +0,0 @@ var should = require("should"); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1970
70464