dlmanning / gulp-sass

SASS plugin for gulp
MIT License
1.56k stars 381 forks source link

Dart SASS Options not Working #811

Closed alialaa closed 2 years ago

alialaa commented 3 years ago

I am trying to pass options provided by dart-sass to the sync function but apparently they are not working.

For example I am trying to quiet warnings and it's working using the SASS CLI but not with gulp-sass:

import dartSass from 'sass';
import gulpSass from 'gulp-sass';
import gulp from 'gulp';

const sass = gulpSass(dartSass);

export const styles = () => {
  return (
    gulp
      .src(paths.styles.src)
      .pipe(sass.sync({ quiet: true }).on('error', sass.logError))
      .pipe(gulp.dest(paths.styles.dest))
      .pipe(server.stream())
  );
};
joonassandell commented 3 years ago

+1

stof commented 2 years ago

@alialaa the JS API of dart-sass does not support a quiet option: https://sass-lang.com/documentation/js-api#options

jaxtheking commented 2 years ago

@alialaa the JS API of dart-sass does not support a quiet option: https://sass-lang.com/documentation/js-api#options

It does however support 'quietDeps' from v1.35.0+ but the PO is right, that's not working

ronilaukkarinen commented 2 years ago

Just noticed the same thing. Any tips?

stof commented 2 years ago

but quietDeps is only silencing warnings coming from files loaded from load paths. And so if you don't have any load paths in your options (includePaths actually in the existing JS API inherited from node-sass), the quietDeps option will be useless as it won't ever consider you have dependencies that should be quiet.

ronilaukkarinen commented 2 years ago

Oh yes, just noticed it indeed works for includePaths. Others I can fix myself. Thanks.

xzyfer commented 2 years ago

This package is in maintenance mode. We aim to resolved security issues and general high priority maintenance.

A PR for this functionality would be welcomed.