From 2840f04c1cecbfb9f9d603c971f69057739395db Mon Sep 17 00:00:00 2001 From: Andy Hebrank Date: Thu, 22 Dec 2016 12:27:07 -0500 Subject: [PATCH 1/2] hack to find composer.json in a starterkit, same as current method for dist --- src/PatternLab/Fetch.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PatternLab/Fetch.php b/src/PatternLab/Fetch.php index d13ee936..c58244b2 100644 --- a/src/PatternLab/Fetch.php +++ b/src/PatternLab/Fetch.php @@ -95,6 +95,11 @@ public function fetchStarterKit($starterkit = "") { Console::writeError("the starterkit needs to contain a dist/ directory before it can be installed..."); } + if (!is_file($tempComposerFile)) { + // try without repo dir + $tempComposerFile = $tempDirSK.DIRECTORY_SEPARATOR."composer.json"; + } + // check for composer.json. if it exists use it for determining things. otherwise just mirror dist/ to source/ if (file_exists($tempComposerFile)) { From e589d5e069504c5e07d733f45434234b725fdc20 Mon Sep 17 00:00:00 2001 From: Andy Hebrank Date: Thu, 22 Dec 2016 13:00:13 -0500 Subject: [PATCH 2/2] need a separator, too --- src/PatternLab/Fetch.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PatternLab/Fetch.php b/src/PatternLab/Fetch.php index c58244b2..882fde9f 100644 --- a/src/PatternLab/Fetch.php +++ b/src/PatternLab/Fetch.php @@ -108,7 +108,7 @@ public function fetchStarterKit($starterkit = "") { // see if it has a patternlab section that might define the files to move if (isset($tempComposerJSON["extra"]) && isset($tempComposerJSON["extra"]["patternlab"])) { Console::writeInfo("installing the starterkit..."); - InstallerUtil::parseComposerExtraList($tempComposerJSON["extra"]["patternlab"], $starterkit, $tempDirDist); + InstallerUtil::parseComposerExtraList($tempComposerJSON["extra"]["patternlab"], $starterkit, $tempDirDist.DIRECTORY_SEPARATOR); Console::writeInfo("installed the starterkit..."); } else { $this->mirrorDist($sourceDir, $tempDirDist);