Skip to content

Commit

Permalink
SCSS files cached in gulp watch with gulp-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sazedul-haque committed Dec 21, 2023
1 parent 49e2d6c commit 8bc5b1f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var gulp = require('gulp'),
wpPot = require('gulp-wp-pot'),
clean = require('gulp-clean'),
zip = require('gulp-zip'),
cache = require('gulp-cached'),
fs = require('fs'),
path = require('path'),
versionNumber = '';
Expand Down Expand Up @@ -84,6 +85,7 @@ for (let task in scss_blueprints) {
gulp.task(task, function() {
return gulp
.src(blueprint.src)
.pipe(cache('sass'))
.pipe(plumber({ errorHandler: onError }))
.pipe(sourcemaps.init({ loadMaps: true, largeFile: true }))
.pipe(sass({ outputStyle: 'compressed', sass: require('sass') }))
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"docz": "^2.3.1",
"emotion": "^11.0.0",
"fs-extra": "^10.0.0",
"gulp-cached": "^1.1.1",
"immutability-helper": "^3.1.1",
"lodash": "^4.17.21",
"mini-css-extract-plugin": "^2.2.2",
Expand Down

0 comments on commit 8bc5b1f

Please # to comment.