Skip to content

Commit 7dd6d48

Browse files
committed
install assets and save path appropriately
1 parent c976fa4 commit 7dd6d48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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)