compress icons (#5836)

pull/5838/head
Bram Kragten 2020-05-11 23:59:29 +02:00 committed by GitHub
parent 466a1af902
commit 84a2676a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 6 deletions

View File

@ -9,25 +9,30 @@ const paths = require("../paths");
gulp.task("compress-app", function compressApp() { gulp.task("compress-app", function compressApp() {
const jsLatest = gulp const jsLatest = gulp
.src(path.resolve(paths.output, "**/*.js")) .src(path.resolve(paths.output, "**/*.js"))
.pipe(zopfli()) .pipe(zopfli({ threshold: 150 }))
.pipe(gulp.dest(paths.output)); .pipe(gulp.dest(paths.output));
const jsEs5 = gulp const jsEs5 = gulp
.src(path.resolve(paths.output_es5, "**/*.js")) .src(path.resolve(paths.output_es5, "**/*.js"))
.pipe(zopfli()) .pipe(zopfli({ threshold: 150 }))
.pipe(gulp.dest(paths.output_es5)); .pipe(gulp.dest(paths.output_es5));
const polyfills = gulp const polyfills = gulp
.src(path.resolve(paths.static, "polyfills/*.js")) .src(path.resolve(paths.static, "polyfills/*.js"))
.pipe(zopfli()) .pipe(zopfli({ threshold: 150 }))
.pipe(gulp.dest(path.resolve(paths.static, "polyfills"))); .pipe(gulp.dest(path.resolve(paths.static, "polyfills")));
const translations = gulp const translations = gulp
.src(path.resolve(paths.static, "translations/*.json")) .src(path.resolve(paths.static, "translations/**/*.json"))
.pipe(zopfli()) .pipe(zopfli({ threshold: 150 }))
.pipe(gulp.dest(path.resolve(paths.static, "translations"))); .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() { gulp.task("compress-hassio", function compressApp() {