Comparing version 0.8.7 to 0.8.8
@@ -286,3 +286,3 @@ makeInstaller = function (options) { | ||
var child = getOwn(file.c, part + extensions[e]); | ||
if (child) { | ||
if (child && ! fileIsDirectory(child)) { | ||
return child; | ||
@@ -289,0 +289,0 @@ } |
@@ -1,1 +0,1 @@ | ||
makeInstaller=function(r){"use strict";function n(r,n){return i(r)&&(l(g,r,n),o(x)&&x(q)),q}function e(r){this.id=r,this.children=[],this.childrenById={}}function t(r,n){return I.call(r,n)&&r[n]}function i(r){return r&&"object"==typeof r}function o(r){return"function"==typeof r}function u(r){return"string"==typeof r}function c(r){function n(n){var e=m(r,n);if(e)return s(e,r.m);var t=new Error("Cannot find module '"+n+"'");if(o(k))return k(n,r.m.id,t);throw t}return o(j)&&(n=j(n,r.m.id)),n.extensions=d(r).slice(0),n.resolve=function(n){var e=m(r,n);if(e)return e.m.id;var t=new Error("Cannot find module '"+n+"'");if(k&&o(k.resolve))return k.resolve(n,r.m.id,t);throw t},n}function f(r,n){var t=this;t.p=n=n||null,t.m=new e(r)}function s(r,n){var e=r&&r.c,t=r.m;if(!I.call(t,"exports")){if(n){t.parent=n;var i=n.children;Array.isArray(i)&&i.push(t)}o(t.useNode)&&t.useNode()||e(t.require=t.require||c(r),t.exports={},t,r.m.id,r.p.m.id),t.loaded=!0}return o(t.runModuleSetters)&&t.runModuleSetters(),t.exports}function a(r){return r&&i(r.c)}function l(r,n,e){if(Array.isArray(n)){var c=[];n.forEach(function(r){u(r)?c.push(r):o(r)&&(n=r)}),o(n)?n.d=c:n=null}else o(n)?n.d=n.d||[]:u(n)||i(n)||(n=null);n&&(r.c=r.c||(i(n)?{}:n),i(n)&&a(r)&&Object.keys(n).forEach(function(i){if(".."===i)o=r.p;else{var o=t(r.c,i);o||(o=r.c[i]=new f(r.m.id.replace(/\/*$/,"/")+i,r),o.o=e)}l(o,n[i],e)}))}function d(r){return r.o&&r.o.extensions||w}function p(r,n,e){for(;r&&!a(r);)r=r.p;if(!r||!n||"."===n)return r;if(".."===n)return r.p;var i=t(r.c,n);if(e&&(!i||a(i)))for(var o=0;o<e.length;++o){var u=t(r.c,n+e[o]);if(u)return u}return i}function v(r,n,e){var t=n.split("/");return t.every(function(n,i){return r=i<t.length-1?p(r,n):p(r,n,e)}),r}function h(r,n){var e=n&&n.m;r&&e&&(r.childrenById[e.id]=e)}function m(r,n,e,t){var e=e||r.m,i=d(r);for(r="/"===n.charAt(0)?v(g,n,i):"."===n.charAt(0)?v(r,n,i):y(r,n,i);a(r);){if(t=t||[],t.indexOf(r)<0){t.push(r);var o,c=p(r,"package.json"),f=c&&s(c,e);if(f&&(A&&u(o=f.browser)||u(o=f.main))&&(h(e,c),r=v(r,o,i)||m(r,o,e,t)))continue}r=p(r,"index.js")}return r&&u(r.c)&&(r=m(r,r.c,e,t)),h(e,r),r}function y(r,n,e){if(o(b)&&(n=b(n,r.m.id)),u(n)){for(var t;r&&!t;r=r.p)t=a(r)&&v(r,"node_modules/"+n,e);return t}}r=r||{};var w=r.extensions||[".js",".json"],x=r.onInstall,j=r.wrapRequire,b=r.override,k=r.fallback,A=r.browser,I={}.hasOwnProperty,g=new f("/",new f("/..")),q=c(g);return e.prototype.resolve=function(r){return this.require.resolve(r)},n.Module=e,n},"object"==typeof exports&&(exports.makeInstaller=makeInstaller); | ||
makeInstaller=function(r){"use strict";function n(r,n){return i(r)&&(l(g,r,n),o(x)&&x(q)),q}function e(r){this.id=r,this.children=[],this.childrenById={}}function t(r,n){return I.call(r,n)&&r[n]}function i(r){return r&&"object"==typeof r}function o(r){return"function"==typeof r}function u(r){return"string"==typeof r}function c(r){function n(n){var e=m(r,n);if(e)return s(e,r.m);var t=new Error("Cannot find module '"+n+"'");if(o(k))return k(n,r.m.id,t);throw t}return o(j)&&(n=j(n,r.m.id)),n.extensions=d(r).slice(0),n.resolve=function(n){var e=m(r,n);if(e)return e.m.id;var t=new Error("Cannot find module '"+n+"'");if(k&&o(k.resolve))return k.resolve(n,r.m.id,t);throw t},n}function f(r,n){var t=this;t.p=n=n||null,t.m=new e(r)}function s(r,n){var e=r&&r.c,t=r.m;if(!I.call(t,"exports")){if(n){t.parent=n;var i=n.children;Array.isArray(i)&&i.push(t)}o(t.useNode)&&t.useNode()||e(t.require=t.require||c(r),t.exports={},t,r.m.id,r.p.m.id),t.loaded=!0}return o(t.runModuleSetters)&&t.runModuleSetters(),t.exports}function a(r){return r&&i(r.c)}function l(r,n,e){if(Array.isArray(n)){var c=[];n.forEach(function(r){u(r)?c.push(r):o(r)&&(n=r)}),o(n)?n.d=c:n=null}else o(n)?n.d=n.d||[]:u(n)||i(n)||(n=null);n&&(r.c=r.c||(i(n)?{}:n),i(n)&&a(r)&&Object.keys(n).forEach(function(i){if(".."===i)o=r.p;else{var o=t(r.c,i);o||(o=r.c[i]=new f(r.m.id.replace(/\/*$/,"/")+i,r),o.o=e)}l(o,n[i],e)}))}function d(r){return r.o&&r.o.extensions||w}function p(r,n,e){for(;r&&!a(r);)r=r.p;if(!r||!n||"."===n)return r;if(".."===n)return r.p;var i=t(r.c,n);if(e&&(!i||a(i)))for(var o=0;o<e.length;++o){var u=t(r.c,n+e[o]);if(u&&!a(u))return u}return i}function v(r,n,e){var t=n.split("/");return t.every(function(n,i){return r=i<t.length-1?p(r,n):p(r,n,e)}),r}function h(r,n){var e=n&&n.m;r&&e&&(r.childrenById[e.id]=e)}function m(r,n,e,t){var e=e||r.m,i=d(r);for(r="/"===n.charAt(0)?v(g,n,i):"."===n.charAt(0)?v(r,n,i):y(r,n,i);a(r);){if(t=t||[],t.indexOf(r)<0){t.push(r);var o,c=p(r,"package.json"),f=c&&s(c,e);if(f&&(A&&u(o=f.browser)||u(o=f.main))&&(h(e,c),r=v(r,o,i)||m(r,o,e,t)))continue}r=p(r,"index.js")}return r&&u(r.c)&&(r=m(r,r.c,e,t)),h(e,r),r}function y(r,n,e){if(o(b)&&(n=b(n,r.m.id)),u(n)){for(var t;r&&!t;r=r.p)t=a(r)&&v(r,"node_modules/"+n,e);return t}}r=r||{};var w=r.extensions||[".js",".json"],x=r.onInstall,j=r.wrapRequire,b=r.override,k=r.fallback,A=r.browser,I={}.hasOwnProperty,g=new f("/",new f("/..")),q=c(g);return e.prototype.resolve=function(r){return this.require.resolve(r)},n.Module=e,n},"object"==typeof exports&&(exports.makeInstaller=makeInstaller); |
@@ -18,3 +18,3 @@ { | ||
], | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"license": "MIT", | ||
@@ -34,5 +34,5 @@ "homepage": "http://github.com/benjamn/install", | ||
"docco": "^0.7.0", | ||
"mocha": "^2.3.3", | ||
"mocha": "^3.2.0", | ||
"uglifyjs": "^2.4.10", | ||
"reify": "^0.1.9" | ||
"reify": "^0.6.2" | ||
}, | ||
@@ -39,0 +39,0 @@ "license": "MIT", |
@@ -1,2 +0,2 @@ | ||
# install [![Build Status](https://travis-ci.org/benjamn/install.svg?branch=master)](https://travis-ci.org/benjamn/install) | ||
# install [![Build Status](https://travis-ci.org/benjamn/install.svg?branch=master)](https://travis-ci.org/benjamn/install) [![Greenkeeper badge](https://badges.greenkeeper.io/benjamn/install.svg)](https://greenkeeper.io/) | ||
@@ -3,0 +3,0 @@ The [CommonJS module syntax](http://wiki.commonjs.org/wiki/Modules/1.1) is one of the most widely accepted conventions in the JavaScript ecosystem. Everyone seems to agree that `require` and `exports` are a reasonable way of expressing module dependencies and interfaces, and the tools for managing modular code are getting better all the time. |
Sorry, the diff of this file is not supported yet
423477