Search packages/non-core/*/packages for local packages.

Currently this finds only Blaze-related packages, but it does so without
hard-coding "blaze" in tools code.
This commit is contained in:
Ben Newman
2016-09-09 13:24:39 -04:00
parent 3fce5e6f93
commit 17f79c66ce
2 changed files with 12 additions and 2 deletions

View File

@@ -607,7 +607,13 @@ _.extend(ProjectContext.prototype, {
if (! self._ignoreCheckoutPackages && files.inCheckout()) {
// Running from a checkout, so use the Meteor core packages from the
// checkout.
searchDirs.push(files.pathJoin(files.getCurrentToolsDir(), 'packages'));
const packagesDir =
files.pathJoin(files.getCurrentToolsDir(), 'packages');
searchDirs.push(
packagesDir,
files.pathJoin(packagesDir, "non-core", "*", "packages"),
);
}
return searchDirs;
},

View File

@@ -221,6 +221,9 @@ var newIsopacketBuildingCatalog = function () {
var messages = buildmessage.capture(
{ title: "scanning local core packages" },
function () {
const packagesDir =
files.pathJoin(files.getCurrentToolsDir(), 'packages');
// When running from a checkout, isopacket building does use local
// packages, but *ONLY THOSE FROM THE CHECKOUT*: not app packages or
// $PACKAGE_DIRS packages. One side effect of this: we really really
@@ -228,7 +231,8 @@ var newIsopacketBuildingCatalog = function () {
// (there's no worries about needing to springboard).
isopacketCatalog.initialize({
localPackageSearchDirs: [
files.pathJoin(files.getCurrentToolsDir(), 'packages'),
packagesDir,
files.pathJoin(packagesDir, "non-core", "*", "packages"),
],
buildingIsopackets: true
});