Comparing version 0.2.0 to 0.2.1
@@ -10,5 +10,6 @@ var fs = require('fs'), | ||
.replace(/\/*([^/]+)\/\n/g, ''); | ||
var defaults = { | ||
main: 'index.js', | ||
reqpath: path.dirname(require.cache[__filename].parent.filename) | ||
reqpath: '' | ||
}; | ||
@@ -183,2 +184,5 @@ | ||
Renderer.prototype._fullPath = function(p) { | ||
if(typeof p != 'string') { | ||
throw new Error('Path is not a string: '+p); | ||
} | ||
if(p.substr(0, 1) == '.') { | ||
@@ -185,0 +189,0 @@ p = path.normalize(this.options.reqpath + path.sep + p); |
@@ -35,1 +35,3 @@ var Minilog = require('minilog'); | ||
module.exports = require('./glue.js'); | ||
module.exports.defaults({ 'reqpath': require('path').dirname(require.cache[__filename].parent.filename) }); |
function require(e, t) { | ||
for (var n = [], r = e.split("/"), i, s, o = 0; s = r[o++]; ) ".." == s ? n.pop() : "." != s && n.push(s); | ||
n = n.join("/"), o = require, s = o.m[t || 0], i = s[n + ".js"] || s[n + "/index.js"] || s[n]; | ||
n = n.join("/"), o = require, s = o.m[t || 0], i = s[n + ".js"] || s[n + "/index.js"] || s[n], r = 'Cannot require("' + n + '")'; | ||
if (!i) throw Error(r); | ||
if (s = i.c) i = o.m[t = s][e = i.m]; | ||
if (!i) throw Error(r); | ||
return i.exports || i(i, i.exports = {}, function(n) { | ||
@@ -6,0 +8,0 @@ return o("." != n.charAt(0) ? n : e + "/../" + n, t); |
@@ -1,1 +0,1 @@ | ||
function require(e,t){for(var n=[],r=e.split("/"),i,s,o=0;s=r[o++];)".."==s?n.pop():"."!=s&&n.push(s);n=n.join("/"),o=require,s=o.m[t||0],i=s[n+".js"]||s[n+"/index.js"]||s[n];if(s=i.c)i=o.m[t=s][e=i.m];return i.exports||i(i,i.exports={},function(n){return o("."!=n.charAt(0)?n:e+"/../"+n,t)}),i.exports}; | ||
function require(e,t){for(var n=[],r=e.split("/"),i,s,o=0;s=r[o++];)".."==s?n.pop():"."!=s&&n.push(s);n=n.join("/"),o=require,s=o.m[t||0],i=s[n+".js"]||s[n+"/index.js"]||s[n],r='Cannot require("'+n+'")';if(!i)throw Error(r);if(s=i.c)i=o.m[t=s][e=i.m];if(!i)throw Error(r);return i.exports||i(i,i.exports={},function(n){return o("."!=n.charAt(0)?n:e+"/../"+n,t)}),i.exports}; |
@@ -14,2 +14,4 @@ function require(p, context) { | ||
|| temp[normalized]; | ||
parts = 'Cannot require("' + normalized + '")'; | ||
if (!mod) throw Error(parts); | ||
if(temp = mod.c) { | ||
@@ -22,4 +24,4 @@ mod = i["m"][context = temp][p = mod.m]; | ||
} | ||
/* console.log('Load ['+ (context || 0) +']["' + p + '"], result', !!mod, !!mod.exports); | ||
if (!mod) throw Error('Cannot require("' + p + '")'); */ | ||
/* console.log('Load ['+ (context || 0) +']["' + p + '"], result', !!mod, !!mod.exports);*/ | ||
if (!mod) throw Error(parts); | ||
@@ -26,0 +28,0 @@ if(!mod.exports){ |
{ | ||
"name": "gluejs", | ||
"description": "Build CommonJS modules for the browser via a chainable API", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Mikito Takada", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32236
533