quickstart
Advanced tools
Comparing version 1.1.3 to 1.1.4
{ | ||
"name": "quickstart", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "CommonJS module compiler for node.js and browsers", | ||
@@ -5,0 +5,0 @@ "main": "./main.js", |
@@ -102,2 +102,6 @@ /* jshint strict:false */ | ||
it('should evaluate main fields as folders too', function() { | ||
return expect(resolve('seven').then(relative)).to.eventually.equal('./node_modules/seven/lib/index.js'); | ||
}); | ||
it('should resolve a package with specified main overridden by the browser field', function() { | ||
@@ -104,0 +108,0 @@ return expect(resolve('five').then(relative)).to.eventually.equal('./node_modules/five/browser.js'); |
@@ -180,4 +180,5 @@ /* global -Promise*/ | ||
}).then(function(json) { | ||
var main = isString(json.browser) ? json.browser : (json.main || 'index'); | ||
return self._file(pathogen.resolve(full, main)); | ||
var main = isString(json.browser) ? json.browser : json.main; | ||
if (main == null) return self._file(pathogen.resolve(full, 'index')); | ||
return self._load(pathogen.resolve(full, main)); | ||
}); | ||
@@ -184,0 +185,0 @@ }, |
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
553931
63
2379