diff --git a/frontend/gulpfile.js b/frontend/gulpfile.js index 5f05d3d20..6e561569a 100644 --- a/frontend/gulpfile.js +++ b/frontend/gulpfile.js @@ -20,6 +20,7 @@ const {rimraf} = require("rimraf"); const sass = require("sass"); const gettext = require("gettext-parser"); const marked = require("marked"); +const cache = require("gulp-cached"); const mapStream = require("map-stream"); const paths = {}; @@ -187,8 +188,9 @@ gulpSass.compiler = sass; gulp.task("scss:modules", function() { return gulp.src(["src/**/**.scss"]) - .pipe(gulpSass.sync({includePaths: ["./resources/styles/common/", - "./resources/styles/"]}).on('error', gulpSass.logError)) + .pipe(cache("sass")) + .pipe(gulpSass.sync({includePaths: ["./resources/styles/common/", "./resources/styles/"]}).on('error', gulpSass.logError)) + .pipe(cache("modules")) .pipe(gulpPostcss([ modules({ generateScopedName: "[folder]_[name]_[local]_[hash:base64:5]", diff --git a/frontend/package.json b/frontend/package.json index 49499c8df..e6d46b70c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -35,6 +35,7 @@ "cypress-file-upload": "^5.0.8", "gettext-parser": "^7.0.1", "gulp": "4.0.2", + "gulp-cached": "^1.1.1", "gulp-concat": "^2.6.1", "gulp-gzip": "^1.4.2", "gulp-mustache": "^5.0.0", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 45fb17c95..3ee87430d 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -2403,6 +2403,14 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +gulp-cached@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/gulp-cached/-/gulp-cached-1.1.1.tgz#fe7cd4f87f37601e6073cfedee5c2bdaf8b6acce" + integrity sha512-OEGsICR6Vmx0VK3nhpy5MGPzAjeDYC3+NKxNtJAu4DW8L15oy8tCe2WuD6HDEj9BsbSopnOBiXPK95YHvO0DpA== + dependencies: + lodash.defaults "^4.2.0" + through2 "^2.0.1" + gulp-cli@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.3.0.tgz#ec0d380e29e52aa45e47977f0d32e18fd161122f" @@ -3314,6 +3322,11 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== + lodash.escape@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" @@ -5288,7 +5301,7 @@ through2-filter@^3.0.0: through2 "~2.0.0" xtend "~4.0.0" -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: +through2@^2.0.0, through2@^2.0.1, through2@^2.0.3, through2@~2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==