setLineNumberStyle() public method

Set line number style
public setLineNumberStyle ( string $lineNumberStyle )
$lineNumberStyle string
Ejemplo n.º 1
0
 public function setProductionMode($isProduction)
 {
     if ($isProduction) {
         $this->compiler->setLineNumberStyle(0);
         $this->compiler->setFormatter(CompressedOutput::class);
     }
 }
Ejemplo n.º 2
0
 /**
  * @param LeafoCompiler $compiler
  * @return LeafoScssProcessor
  */
 public function setCompiler(LeafoCompiler $compiler)
 {
     $compiler->setImportPaths($this->importPaths);
     $compiler->setFormatter($this->getFormatter());
     $compiler->setLineNumberStyle($this->getLineNumberStyle());
     $this->compiler = $compiler;
     return $this;
 }
Ejemplo n.º 3
0
 public static function compileFile(string $file, array $paths, string $formatter, bool $lineComments) : array
 {
     $location = static::resolveFile($file, $paths);
     $compiler = new Compiler();
     $compiler->setImportPaths(\dirname($location));
     $compiler->addImportPath(function (string $path) use($paths) {
         return static::resolveFile($path, $paths);
     });
     $compiler->setFormatter($formatter);
     if ($lineComments) {
         $compiler->setLineNumberStyle(Compiler::LINE_COMMENTS);
     }
     $css = $compiler->compile(\file_get_contents($location), $location);
     return [$css, $compiler->getParsedFiles()];
 }