Skip to content

Commit

Permalink
silent logger, use sync for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanman committed Mar 30, 2022
1 parent 4201f17 commit 02c43f0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gulp/sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gulp.task('sass-extensions', function (done) {

gulp.task('sass', function () {
return gulp.src(config.paths.assets + '/sass/*.scss', { sourcemaps: true })
.pipe(sass({ outputStyle: 'expanded', logger: sass.compiler.Logger.silent}, false).on('error', function (error) {
.pipe(sass.sync({ outputStyle: 'expanded', logger: sass.compiler.Logger.silent }, false).on('error', function (error) {
// write a blank application.css to force browser refresh on error
if (!fs.existsSync(stylesheetDirectory)) {
fs.mkdirSync(stylesheetDirectory)
Expand All @@ -37,16 +37,17 @@ gulp.task('sass', function () {

gulp.task('sass-documentation', function () {
return gulp.src(config.paths.docsAssets + '/sass/*.scss', { sourcemaps: true })
.pipe(sass({ outputStyle: 'expanded' }).on('error', sass.logError))
.pipe(sass.sync({ outputStyle: 'expanded', logger: sass.compiler.Logger.silent }).on('error', sass.logError))
.pipe(gulp.dest(config.paths.public + '/stylesheets/', { sourcemaps: true }))
})

// Backward compatibility with Elements

gulp.task('sass-v6', function () {
return gulp.src(config.paths.v6Assets + '/sass/*.scss', { sourcemaps: true })
.pipe(sass({
.pipe(sass.sync({
outputStyle: 'expanded',
logger: sass.compiler.Logger.silent,
includePaths: [
'node_modules/govuk_frontend_toolkit/stylesheets',
'node_modules/govuk-elements-sass/public/sass',
Expand Down

0 comments on commit 02c43f0

Please sign in to comment.