Permalink
Browse files

changed parsing to let LessPHP handle the file instead of the string …

…to enable @import statements
  • Loading branch information...
1 parent 45e45b7 commit fb4b0c765d9041c1a9d5f8c2884848508cd3ae8c @bovan committed Feb 8, 2012
Showing with 5 additions and 8 deletions.
  1. +5 −8 View/Helper/LessHelper.php
View
@@ -79,13 +79,10 @@ public function link($path, $options = array())
} else {
$path = $files[$k];
}
-
- $data[$path] = file_get_contents($path);
+ $data[$path] = $this->__compileLess($path);
}
foreach ($data as $k => $css) {
- $css = $this->__compileLess($css);
-
if ($options['minify']) {
$css = $this->__minifyCss($css);
}
@@ -119,14 +116,14 @@ public function link($path, $options = array())
/**
* Invokes the LessPHP class and returns the compiled input
*
- * @param string $input
+ * @param string $path
* @return string
* @access private
*/
- private function __compileLess($input)
+ private function __compileLess($path)
{
- $less = new lessc();
- return $less->parse($input);
+ $lessc = new lessc($path);
+ return $lessc->parse();
}
/**

0 comments on commit fb4b0c7

Please sign in to comment.