Skip to content

Commit

Permalink
normalize the package names, package.jsons were getting skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 21, 2012
1 parent 9b30b2b commit da4384e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "browserify",
"version" : "1.12.2",
"version" : "1.12.3",
"description" : "browser-side require() for js directories and npm modules",
"main" : "index.js",
"bin" : {
Expand Down
3 changes: 2 additions & 1 deletion wrappers/prelude.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ require.resolve = (function () {
throw new Error("Cannot find module '" + x + "'");

function loadAsFileSync (x) {
x = path.normalize(x);
if (require.modules[x]) {
return x;
}
Expand All @@ -53,7 +54,7 @@ require.resolve = (function () {

function loadAsDirectorySync (x) {
x = x.replace(/\/+$/, '');
var pkgfile = x + '/package.json';
var pkgfile = path.normalize(x + '/package.json');
if (require.modules[pkgfile]) {
var pkg = require.modules[pkgfile]();
var b = pkg.browserify;
Expand Down

0 comments on commit da4384e

Please sign in to comment.