Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit 9137c2b

Browse files
committed
correct main handling
1 parent 622b950 commit 9137c2b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

github.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,7 @@ GithubLocation.configure = function(config, ui) {
282282
});
283283
};
284284

285-
// regular expression to verify package names
286-
GithubLocation.packageFormat = /^[^\/]+\/[^\/]+/;
285+
GithubLocation.packageNameFormats = ['*/*'];
287286

288287
GithubLocation.prototype = {
289288

@@ -569,9 +568,9 @@ GithubLocation.prototype = {
569568
},
570569

571570
// check if the main entry point exists. If not, try the bower.json main.
572-
build: function(pjson, dir) {
573-
var main = pjson.main || '';
574-
var libDir = pjson.directories && (pjson.directories.dist || pjson.directories.lib) || '.';
571+
processPackage: function(packageConfig, packageName, dir) {
572+
var main = packageConfig.main || '';
573+
var libDir = packageConfig.directories && (packageConfig.directories.dist || packageConfig.directories.lib) || '.';
575574

576575
if (main instanceof Array)
577576
main = main[0];
@@ -622,7 +621,7 @@ GithubLocation.prototype = {
622621
}, function() {})
623622
.then(function(hasBowerMain) {
624623
if (hasBowerMain)
625-
return hasBrowserMain;
624+
return hasBowerMain;
626625

627626
main = 'index';
628627
return checkMain(main, libDir);

0 commit comments

Comments
 (0)