Skip to content

Commit

Permalink
Merge pull request #70 from Tuxion/hotfix/glob-issue
Browse files Browse the repository at this point in the history
Fixed glob pattern causing CSS files to be filtered.
  • Loading branch information
RobLoach committed Sep 16, 2014
2 parents 225068e + 832e135 commit 7aaa3d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ComponentInstaller/Process/RequireCssProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function process()
$sourceRoot = dirname($path);
// The style path to the CSS file when external.
$sourcePath = $package . '/' . $style;
//Replace glob patterns with filenames.
$filename = basename($style);
if(preg_match('~^\*(\.[^\.]+)$~', $filename, $matches)){
$sourcePath = str_replace($filename, basename($assetPath), $sourcePath);
}
// Where the final CSS will be generated.
$targetPath = $this->componentDir;
// Build the asset and add it to the collection.
Expand Down

0 comments on commit 7aaa3d2

Please sign in to comment.