/** * @group integration */ public function testSass() { if (!isset($_SERVER['SASS_BIN'])) { $this->markTestSkipped('There is no SASS_BIN environment variable.'); } $input = <<<EOF body color: #F00 EOF; $asset = new StringAsset($input); $asset->load(); $filter = new SassFilter($_SERVER['SASS_BIN']); $filter->setStyle(SassFilter::STYLE_COMPACT); $filter->filterLoad($asset); $filter->filterDump($asset); $this->assertEquals("body { color: red; }\n", $asset->getContent(), '->filterLoad() parses the sass'); }
/** * {@inheritdoc} */ protected function createProcessBuilder(array $arguments = []) { $pb = parent::createProcessBuilder($arguments); // TODO: ENV вообще if ($this->gemPath) { $pb->setEnv('GEM_PATH', $this->gemPath); } foreach ($this->loadPaths as $path) { $pb->add('--load-path')->add($path); } if ($this->debug) { // TODO: restore //$pb->add('--sourcemap'); $pb->add('--trace'); } if ($this->encoding) { $pb->add('--default-encoding')->add($this->encoding); } return $pb; }
public function __construct($sassPath = '/usr/bin/sass') { parent::__construct($sassPath); $this->setScss(true); }
/** * Create a new LessFilter instance. * * @param AssetParser $parser */ public function __construct(AssetParser $parser) { $this->parser = $parser; parent::__construct(env('SASS_PATH', '/usr/bin/sass'), null); }