Skip to content

Commit 138014b

Browse files
committed
Merge branch 'feature/md-desc-var-fix' of https://github.com/EvanLovely/patternlab-php-core into feature-installupdate
2 parents d66b57f + c2f5d90 commit 138014b

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

src/PatternLab/Fetch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected function mirrorDist($sourceDir, $tempDirDist) {
203203
// mirror dist to source
204204
Console::writeInfo("installing the starterkit files...");
205205
$fs = new Filesystem();
206-
$fs->mirror($tempDirDist, $sourceDir, null);
206+
$fs->mirror($tempDirDist, $sourceDir, null, $fsOptions);
207207
Console::writeInfo("starterkit files have been installed...");
208208

209209
}

src/PatternLab/PatternData/Exporters/PatternPartialsExporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function run($type = "", $subtype = "") {
4242
$store = PatternData::get();
4343
foreach ($store as $patternStoreKey => $patternStoreData) {
4444

45-
if (($patternStoreData["category"] == "pattern") && (!$patternStoreData["hidden"]) && (!$patternStoreData["noviewall"]) && ($patternStoreData["depth"] == 2) && (!in_array($patternStoreData["type"],$styleGuideExcludes))) {
45+
if (($patternStoreData["category"] == "pattern") && (!$patternStoreData["hidden"]) && (!$patternStoreData["noviewall"]) && ($patternStoreData["depth"] > 1) && (!in_array($patternStoreData["type"],$styleGuideExcludes))) {
4646

4747
if ((($patternStoreData["type"] == $type) && empty($subtype)) || (empty($type) && empty($subtype)) || (($patternStoreData["type"] == $type) && ($patternStoreData["subtype"] == $subtype))) {
4848

src/PatternLab/PatternData/Helpers/LineageHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function run() {
6161

6262
if (strpos($lineage, '/') === false) {
6363
$fileName = $patternStoreData["pathName"].".".$patternExtension;
64-
Console::writeWarning("you may have a typo in ".$fileName.". {{> ".$lineage." }} is not a valid pattern...");
64+
Console::writeWarning("you may have a typo in ".$fileName.". `".$lineage."` is not a valid pattern...");
6565
}
6666

6767
}

src/PatternLab/PatternData/Rules/DocumentationRule.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,14 @@ public function run($depth, $ext, $path, $pathName, $name) {
8181
$patternStoreKey = ($patternSubtypeDoc) ? $docPartial."-plsubtype" : $docPartial;
8282

8383
$patternStoreData = array("category" => $category,
84-
"nameClean" => $title,
8584
"desc" => $markdown,
8685
"descExists" => true,
8786
"meta" => $yaml,
8887
"full" => $doc);
88+
89+
if (isset($title)) {
90+
$patternStoreData["nameClean"] = $title;
91+
}
8992

9093
// if the pattern data store already exists make sure this data overwrites it
9194
$patternStoreData = (PatternData::checkOption($patternStoreKey)) ? array_replace_recursive(PatternData::getOption($patternStoreKey),$patternStoreData) : $patternStoreData;

src/PatternLab/PatternData/Rules/PatternInfoListItemsRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct($options) {
2626
parent::__construct($options);
2727

2828
$this->depthProp = 3; // 3 means that depth won't be checked
29-
$this->extProp = "json||yaml";
29+
$this->extProp = "json||yaml||yml";
3030
$this->isDirProp = false;
3131
$this->isFileProp = true;
3232
$this->searchProp = ".listitems.";

src/PatternLab/PatternData/Rules/PatternInfoRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct($options) {
2626
parent::__construct($options);
2727

2828
$this->depthProp = 3; // 3 means that depth won't be checked
29-
$this->extProp = "json||yaml";
29+
$this->extProp = "json||yaml||yml";
3030
$this->isDirProp = false;
3131
$this->isFileProp = true;
3232
$this->searchProp = "";

src/PatternLab/PatternData/Rules/PatternRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function run($depth, $ext, $path, $pathName, $name) {
9494
"extraOutput" => array());
9595

9696
// add any subtype info if necessary
97-
if ($depth == 2) {
97+
if ($depth > 1) {
9898
$patternStoreData["subtype"] = $patternSubtype;
9999
$patternStoreData["subtypeDash"] = $patternSubtypeDash;
100100
$patternStoreData["breadcrumb"] = $patternTypeClean." > ".$patternSubtypeClean;

src/PatternLab/PatternData/Rules/PseudoPatternRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function __construct($options) {
2626
parent::__construct($options);
2727

2828
$this->depthProp = 3; // 3 means that depth won't be checked
29-
$this->extProp = "json||yaml";
29+
$this->extProp = "json||yaml||yml";
3030
$this->isDirProp = false;
3131
$this->isFileProp = true;
3232
$this->searchProp = "~";
@@ -112,7 +112,7 @@ public function run($depth, $ext, $path, $pathName, $name) {
112112
"pathOrigDash" => $patternPathOrigDash);
113113

114114
// add any subtype info if necessary
115-
if ($depth == 2) {
115+
if ($depth > 1) {
116116
$patternStoreData["subtype"] = $patternSubtype;
117117
$patternStoreData["subtypeDash"] = $patternSubtypeDash;
118118
$patternStoreData["breadcrumb"] = $patternType." > ".$patternSubtype;

0 commit comments

Comments
 (0)