Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…to enable @import statements
  • Loading branch information...
commit fb4b0c765d9041c1a9d5f8c2884848508cd3ae8c 1 parent 45e45b7
@bovan authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 View/Helper/LessHelper.php
View
13 View/Helper/LessHelper.php
@@ -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();
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.