Skip to content

Commit a46d571

Browse files
authored
Merge pull request #6 from drupal-pattern-lab/dev
v2.8.0 RC - Merging Latest on Dev into Master
2 parents e1c0509 + a1d3781 commit a46d571

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Diff for: src/PatternLab/Builder.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ protected function generateViewAllPages() {
391391
$patternData["patternPartial"] = "viewall-".$patternStoreData["nameDash"]."-all";
392392

393393
// add the pattern lab specific mark-up
394-
$partials["patternLabHead"] = $stringLoader->render(array("string" => $htmlHead, "data" => array("cacheBuster" => $partials["cacheBuster"])));
395-
$partials["patternLabFoot"] = $stringLoader->render(array("string" => $htmlFoot, "data" => array("cacheBuster" => $partials["cacheBuster"], "patternData" => json_encode($patternData))));
394+
$globalData["patternLabHead"] = $stringLoader->render(array("string" => $htmlHead, "data" => array("cacheBuster" => $partials["cacheBuster"])));
395+
$globalData["patternLabFoot"] = $stringLoader->render(array("string" => $htmlFoot, "data" => array("cacheBuster" => $partials["cacheBuster"], "patternData" => json_encode($patternData))));
396396

397397
// render the parts and join them
398398
$header = $patternLoader->render(array("pattern" => $patternHead, "data" => $globalData));

Diff for: src/PatternLab/Data.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public static function gather($options = array()) {
125125
$pathName = $file->getPathname();
126126
$pathNameClean = str_replace($sourceDir."/","",$pathName);
127127

128-
if (!$hidden && (($ext == "json") || ($ext == "yaml"))) {
128+
if (!$hidden && (($ext == "json") || ($ext == "yaml") || ($ext == "yml"))) {
129129

130130
if ($isListItems === false) {
131131

@@ -137,7 +137,7 @@ public static function gather($options = array()) {
137137
JSON::lastErrorMsg($pathNameClean,$jsonErrorMessage,$data);
138138
}
139139

140-
} else if ($ext == "yaml") {
140+
} else if (($ext == "yaml") || ($ext == "yml")) {
141141

142142
$file = file_get_contents($pathName);
143143

Diff for: src/PatternLab/InstallerUtil.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,15 @@ protected static function parseComponentList($packageName,$sourceBase,$destinati
349349
// iterate over the returned objects
350350
foreach ($finder as $file) {
351351

352-
$ext = $file->getExtension();
352+
$ext = $file->getExtension();
353+
$pathName = $file->getPathname();
353354

354355
if ($ext == "css") {
355-
$componentTypes["stylesheets"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
356+
$componentTypes["stylesheets"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
356357
} else if ($ext == "js") {
357-
$componentTypes["javascripts"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
358+
$componentTypes["javascripts"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
358359
} else if ($ext == $templateExtension) {
359-
$componentTypes["templates"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
360+
$componentTypes["templates"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
360361
}
361362

362363
}

0 commit comments

Comments
 (0)