You are here

function scss_compiler_page_attachments_alter in SCSS/Less Compiler 8

Implements hook_page_attachments_alter().

File

./scss_compiler.module, line 122
Module compiles scss files into css via scssphp compiler.

Code

function scss_compiler_page_attachments_alter(array &$attachments) {
  if (!Drupal::service('scss_compiler')
    ->isCacheEnabled()) {
    Drupal::service('scss_compiler')
      ->compileAll();
  }
}