Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/PatternLab/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ protected function generateViewAllPages() {
$patternData["patternPartial"] = "viewall-".$patternStoreData["nameDash"]."-all";

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

// render the parts and join them
$header = $patternLoader->render(array("pattern" => $patternHead, "data" => $globalData));
Expand Down
4 changes: 2 additions & 2 deletions src/PatternLab/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function gather($options = array()) {
$pathName = $file->getPathname();
$pathNameClean = str_replace($sourceDir."/","",$pathName);

if (!$hidden && (($ext == "json") || ($ext == "yaml"))) {
if (!$hidden && (($ext == "json") || ($ext == "yaml") || ($ext == "yml"))) {

if ($isListItems === false) {

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

} else if ($ext == "yaml") {
} else if (($ext == "yaml") || ($ext == "yml")) {

$file = file_get_contents($pathName);

Expand Down
9 changes: 5 additions & 4 deletions src/PatternLab/InstallerUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,15 @@ protected static function parseComponentList($packageName,$sourceBase,$destinati
// iterate over the returned objects
foreach ($finder as $file) {

$ext = $file->getExtension();
$ext = $file->getExtension();
$pathName = $file->getPathname();

if ($ext == "css") {
$componentTypes["stylesheets"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
$componentTypes["stylesheets"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
} else if ($ext == "js") {
$componentTypes["javascripts"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
$componentTypes["javascripts"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
} else if ($ext == $templateExtension) {
$componentTypes["templates"][] = str_replace($sourceBase.$source,$destination,$file->getPathname());
$componentTypes["templates"][] = str_replace(DIRECTORY_SEPARATOR,"/",str_replace($sourceBase.$source,$destination,$pathName));
}

}
Expand Down