Skip to content

Commit

Permalink
Added debug output
Browse files Browse the repository at this point in the history
Reduced css file management complexity
  • Loading branch information
MartinMueller2003 committed Jul 7, 2024
1 parent a6b0a1d commit c3b8262
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import gzip from "gulp-gzip";
import { deleteAsync } from "del";
import markdown from "gulp-markdown-github-style";
import rename from "gulp-rename";
import using from "gulp-using";

/* HTML Task */
gulp.task("html", function () {
return gulp
.src(["html/*.html"])
.pipe(using())
.pipe(plumber())
.pipe(
htmlmin({
Expand All @@ -31,12 +33,9 @@ gulp.task("html", function () {
/* CSS Task */
gulp.task("css", function () {
return gulp
.src([
"html/css/bootstrap.css",
"html/css/dropzone.css",
"html/css/style.css",
])
.src(["html/css/*.css"])
.pipe(plumber())
.pipe(using())
.pipe(concat("esps.css"))
.pipe(cleancss())
.pipe(gzip())
Expand All @@ -56,18 +55,21 @@ gulp.task("js", function () {
"html/script.js",
])
.pipe(plumber())
.pipe(using())
.pipe(concat("esps.js"))
.pipe(
terser({ toplevel: true })
) /* comment out this line to debug the script file */
.pipe(gzip())
.pipe(using())
.pipe(gulp.dest("ESPixelStick/data/www"));
});

/* json Task */
gulp.task("json", function () {
return gulp
.src("html/*.json")
.pipe(using())
.pipe(plumber())
.pipe(gulp.dest("ESPixelStick/data"));
});
Expand All @@ -76,6 +78,7 @@ gulp.task("json", function () {
gulp.task("image", function () {
return gulp
.src(["html/**/*.png", "html/**/*.ico"])
.pipe(using())
.pipe(plumber())
.pipe(gulp.dest("ESPixelStick/data/www"));
});
Expand Down

0 comments on commit c3b8262

Please sign in to comment.