You are here

public function LessphpCompiler::importCallback in SCSS/Less Compiler 8

Replaces tokens in import paths.

Parameters

\Less_Tree_Import $import: Compiler import object.

File

src/Plugin/ScssCompiler/LessphpCompiler.php, line 164

Class

LessphpCompiler
Plugin implementation of the Less compiler.

Namespace

Drupal\scss_compiler\Plugin\ScssCompiler

Code

public function importCallback(\Less_Tree_Import $import) {
  if (!empty($import->path->value)) {
    $path = $this->scssCompiler
      ->replaceTokens($import->path->value);
    if ($path) {
      $import->path->value = $path;
    }
  }
}