Skip to content

v2.8.0 RC - Merging Latest on Dev into Master #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2017
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