Skip to content

Commit e1097b0

Browse files
committed
removing gatherMQs()
1 parent 61500b2 commit e1097b0

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/PatternLab/Builder.php

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,6 @@ public function __construct() {
4444

4545
}
4646

47-
/**
48-
* Finds Media Queries in CSS files in the source/css/ dir
49-
*
50-
* @return {Array} an array of the appropriate MQs
51-
*/
52-
protected function gatherMQs() {
53-
54-
$mqs = array();
55-
56-
// iterate over all of the other files in the source directory
57-
$finder = new Finder();
58-
$finder->files()->name("*.css")->in(Config::getOption("sourceDir"));
59-
$finder->sortByName();
60-
61-
foreach ($finder as $file) {
62-
63-
$data = file_get_contents($file->getPathname());
64-
preg_match_all("/@media.*(min|max)-width:([ ]+)?(([0-9]{1,5})(\.[0-9]{1,20}|)(px|em))/",$data,$matches);
65-
foreach ($matches[3] as $match) {
66-
if (!in_array($match,$mqs)) {
67-
$mqs[] = $match;
68-
}
69-
}
70-
71-
}
72-
73-
usort($mqs, "strnatcmp");
74-
75-
return $mqs;
76-
77-
}
78-
7947
/**
8048
* Generates the annotations js file
8149
*/
@@ -151,7 +119,6 @@ protected function generateIndex() {
151119
}
152120
}
153121
$ishControls["ishControlsHide"] = $controlsToHide;
154-
$ishControls["mqs"] = $this->gatherMQs();
155122
$output .= "var ishControls = ".json_encode($ishControls).";";
156123

157124
// load and write out the items for the navigation

0 commit comments

Comments
 (0)