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() {