How to use the sass.js/dist/sass.setWorkerUrl function in sass

To help you get started, we’ve selected a few sass examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ilikeprograms / Cluckles / src / app / core / sass-js / sass.service.ts View on Github external
import { Injectable, NgZone, ChangeDetectorRef, ApplicationRef } from '@angular/core';

import { BehaviorSubject, Observable } from 'rxjs';

import { ISassJs, ISassJsCompileCallbackResult } from './sassjs.interface';

const Sass = require('sass.js/dist/sass');

Sass.setWorkerUrl('assets/dist/sass.worker.js');

const sass: ISassJs = new Sass();

var files = [
  'custom.scss',
  'scss/mixins/_alert.scss',
  'scss/mixins/_background-variant.scss',
  'scss/mixins/_badge.scss',
  'scss/mixins/_border-radius.scss',
  'scss/mixins/_box-shadow.scss',
  'scss/mixins/_breakpoints.scss',
  'scss/mixins/_buttons.scss',
  'scss/mixins/_caret.scss',
  'scss/mixins/_clearfix.scss',
  'scss/mixins/_float.scss',
  'scss/mixins/_forms.scss',