Closed kdocki closed 10 years ago
this is done ... will update docs later once this has been tested some more.
looks like if we have errors in our sass it gives us an ErrorException Undefined offset: 1 ...
This is my hack to use Libsass which is much faster:
Sass ah$ diff SassFilter.php.bak SassFilter.php
47c47
< public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
---
> public function __construct($sassPath = '/usr/local/bin/sassc', $rubyPath = null)
122,130c122
< $pb->add('--load-path')->add(dirname($root.'/'.$path));
< }
<
< if ($this->unixNewlines) {
< $pb->add('--unix-newlines');
< }
<
< if (true === $this->scss || (null === $this->scss && 'scss' == pathinfo($path, PATHINFO_EXTENSION))) {
< $pb->add('--scss');
---
> $pb->add('-I')->add(dirname($root.'/'.$path));
134,138c126
< $pb->add('--style')->add($this->style);
< }
<
< if ($this->quiet) {
< $pb->add('--quiet');
---
> $pb->add('-t')->add($this->style);
142c130
< $pb->add('--debug-info');
---
> $pb->add('-g');
146c134
< $pb->add('--line-numbers');
---
> $pb->add('-l');
149,155c137
< foreach ($this->loadPaths as $loadPath) {
< $pb->add('--load-path')->add($loadPath);
< }
<
< if ($this->cacheLocation) {
< $pb->add('--cache-location')->add($this->cacheLocation);
< }
---
> $pb->add('-i')->add('/assets');
157,162c139,140
< if ($this->noCache) {
< $pb->add('--no-cache');
< }
<
< if ($this->compass) {
< $pb->add('--compass');
---
> foreach ($this->loadPaths as $loadPath) {
> $pb->add('-I')->add($loadPath);
Can you clarify the intent? Is because of the known issues with leafo/scssphp? Or are you looking to support the more terse sass syntax (the superset of scss)? They're both "sass" so I guess I'm just confused.
Looks like the guys over at https://github.com/richthegeek/phpsass are maintaining a fork of phamlp. I tried this out and have successfully gotten sass to work. I will bring this into pipeline once I do some more testing.
I am having to use the real file path though in order to compile because it cannot find @import statements otherwise.