Skip to content
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
7 changes: 6 additions & 1 deletion src/PatternLab/Fetch.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Expand All @@ -103,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);
Expand Down