From 41518496d4dca66e25e4f976cea3ae753c500dd4 Mon Sep 17 00:00:00 2001 From: nightwing Date: Mon, 30 Mar 2015 01:14:06 +0400 Subject: [PATCH] fix package name regex --- node_modules/architect/architect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node_modules/architect/architect.js b/node_modules/architect/architect.js index 512f2994..17c5fe43 100644 --- a/node_modules/architect/architect.js +++ b/node_modules/architect/architect.js @@ -448,7 +448,8 @@ function Architect(config) { }); } - var packageName = (plugin.packagePath || "").replace(/.*plugins\/([^\/]*)\/.*$/, "$1"); + var m = /^plugins\/([^\/]+)|\/plugins\/[^\/]+\/([^\/]+)/.exec(plugin.packagePath); + var packageName = m && (m[1] || m[2]); if (!app.packages[packageName]) app.packages[packageName] = []; if (DEBUG) {