Menu icon Foundation
Gulp, SASS-Files and Error-Handling

Hi,

i use gulp-sass with the SASS-Version of Foundation (installed via bower). Is there an option to show an error message during the compile-process if a function does not exist?
I use a settings file (imported before all foundation files) and inside this file the calc-rem function. There is no error message if the function does not exist, only the value is not correct in the generated css-file. By using a not existing variable i get an error message.

gulpSass

Hi,

i use gulp-sass with the SASS-Version of Foundation (installed via bower). Is there an option to show an error message during the compile-process if a function does not exist?
I use a settings file (imported before all foundation files) and inside this file the calc-rem function. There is no error message if the function does not exist, only the value is not correct in the generated css-file. By using a not existing variable i get an error message.

Rafi Benkual about 4 years ago

rem-calc() is imported from the functions file into foundation, so you do not need to add it to settings.

Geoff Kimball about 4 years ago

If you're using gulp-ruby-sass:

sass('source/')
  .on('error', function (err) {
    console.error('error', err.message);
  });

If you're using gulp-sass:

gulp.src('./sass/**/*.scss')
  .pipe(sass().on('error', sass.logError))

Refer to the readme files for each project to learn more about error handling.