Comparing version 0.2.3 to 0.2.4
@@ -11,5 +11,5 @@ | ||
, exists = fs.existsSync || path.existsSync | ||
, arrow = process.platform == 'win32' ? '-' : '\u21B3' | ||
, defaults = { | ||
compiled: 'compiled' | ||
arrow: ' -> ' | ||
, compiled: 'compiled' | ||
, platform: process.platform | ||
@@ -51,3 +51,5 @@ , arch: process.arch | ||
// Get the module root | ||
opts.module_root = exports.getRoot(exports.getFileName()) | ||
if (!opts.module_root) { | ||
opts.module_root = exports.getRoot(exports.getFileName()) | ||
} | ||
@@ -81,3 +83,3 @@ // Ensure the given bindings name ends with .node | ||
var err = new Error('Could not load the bindings file. Tried:\n' | ||
+ tries.map(function (a) { return ' ' + arrow + ' ' + a }).join('\n')) | ||
+ tries.map(function (a) { return opts.arrow + a }).join('\n')) | ||
err.tries = tries | ||
@@ -135,4 +137,4 @@ throw err | ||
} | ||
if (exists(join(dir, 'package.json'))) { | ||
// Found the 'package.json', we're done | ||
if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) { | ||
// Found the 'package.json' file or 'node_modules' dir; we're done | ||
return dir | ||
@@ -139,0 +141,0 @@ } |
{ "name": "bindings" | ||
, "description": "Helper module for loading your native module's bindings in a cross-platform way" | ||
, "keywords": [ "native", "addon", "bindings", "gyp" ] | ||
, "version": "0.2.3" | ||
, "version": "0.2.4" | ||
, "author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)" | ||
@@ -6,0 +6,0 @@ , "repository": { "type": "git", "url": "git://github.com/TooTallNate/node-bindings.git" } |
8578
137