Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

Feature/plugin name detection for win32 #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions architect.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,9 @@ function Architect(config) {
});
}

var m = /^plugins\/([^\/]+)|\/plugins\/[^\/]+\/([^\/]+)/.exec(plugin.packagePath);
var packageName = m && (m[1] || m[2]);
var m = /^plugins\/([^\/]+)|\/plugins\/([^\/]+)|\/plugins\/[^\/]+\/([^\/]+)|^plugins\\([^\\]+)|\\plugins\\([^\\]+)|\\plugins\\[^\\]+\\([^\\]+)/.exec(plugin.packagePath);

var packageName = m && (m[1] || m[2] || m[3] || m[4] || m[5] || m[6]);
if (!app.packages[packageName]) app.packages[packageName] = [];

if (DEBUG) {
Expand Down Expand Up @@ -527,20 +528,24 @@ function Architect(config) {
callback(null, app);
}); // What about error state?

// Check the config - hopefully this works
var _sortedPlugins = checkConfig(additionalConfig, function(name){
return services[name];
});

if (ready) {
sortedPlugins = _sortedPlugins;
// Start Loading additional plugins
startPlugins(true);
}
else {
_sortedPlugins.forEach(function(item){
sortedPlugins.push(item);
try {
// Check the config - hopefully this works
var _sortedPlugins = checkConfig(additionalConfig, function(name){
return services[name];
});

if (ready) {
sortedPlugins = _sortedPlugins;
// Start Loading additional plugins
startPlugins(true);
}
else {
_sortedPlugins.forEach(function(item){
sortedPlugins.push(item);
});
}
} catch (err) {
callback(err, null);
}
});
}
Expand Down