Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

add --precision option to SassFilter #572

Open
wants to merge 1 commit into from

1 participant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 21, 2014
  1. @stefanotorresi
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/Assetic/Filter/Sass/SassFilter.php
View
10 src/Assetic/Filter/Sass/SassFilter.php
@@ -43,6 +43,7 @@ class SassFilter extends BaseProcessFilter implements DependencyExtractorInterfa
private $cacheLocation;
private $noCache;
private $compass;
+ private $precision;
public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
{
@@ -106,6 +107,11 @@ public function setCompass($compass)
$this->compass = $compass;
}
+ public function setPrecision($precision)
+ {
+ $this->precision = (int) $precision;
+ }
+
public function filterLoad(AssetInterface $asset)
{
$sassProcessArgs = array($this->sassPath);
@@ -159,6 +165,10 @@ public function filterLoad(AssetInterface $asset)
$pb->add('--compass');
}
+ if ($this->precision) {
+ $pb->add('--precision')->add($this->precision);
+ }
+
// input
$pb->add($input = tempnam(sys_get_temp_dir(), 'assetic_sass'));
file_put_contents($input, $asset->getContent());
Something went wrong with that request. Please try again.