From 84a2676a9c04ac399cb0d1ac96074de876f4f083 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 11 May 2020 23:59:29 +0200 Subject: [PATCH] compress icons (#5836) --- build-scripts/gulp/compress.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/build-scripts/gulp/compress.js b/build-scripts/gulp/compress.js index de604f7fa3..aee165c5f7 100644 --- a/build-scripts/gulp/compress.js +++ b/build-scripts/gulp/compress.js @@ -9,25 +9,30 @@ const paths = require("../paths"); gulp.task("compress-app", function compressApp() { const jsLatest = gulp .src(path.resolve(paths.output, "**/*.js")) - .pipe(zopfli()) + .pipe(zopfli({ threshold: 150 })) .pipe(gulp.dest(paths.output)); const jsEs5 = gulp .src(path.resolve(paths.output_es5, "**/*.js")) - .pipe(zopfli()) + .pipe(zopfli({ threshold: 150 })) .pipe(gulp.dest(paths.output_es5)); const polyfills = gulp .src(path.resolve(paths.static, "polyfills/*.js")) - .pipe(zopfli()) + .pipe(zopfli({ threshold: 150 })) .pipe(gulp.dest(path.resolve(paths.static, "polyfills"))); const translations = gulp - .src(path.resolve(paths.static, "translations/*.json")) - .pipe(zopfli()) + .src(path.resolve(paths.static, "translations/**/*.json")) + .pipe(zopfli({ threshold: 150 })) .pipe(gulp.dest(path.resolve(paths.static, "translations"))); - return merge(jsLatest, jsEs5, polyfills, translations); + const icons = gulp + .src(path.resolve(paths.static, "mdi/*.json")) + .pipe(zopfli({ threshold: 150 })) + .pipe(gulp.dest(path.resolve(paths.static, "mdi"))); + + return merge(jsLatest, jsEs5, polyfills, translations, icons); }); gulp.task("compress-hassio", function compressApp() {