1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 07:45:32 -04:00

lots of random cleanup & organization

This commit is contained in:
2021-07-20 15:22:57 -04:00
parent 71892d3e17
commit e4d3e074fd
27 changed files with 425 additions and 419 deletions

View File

@@ -27,14 +27,26 @@ gulp.task("default", gulp.series(
),
));
gulp.task("serve", gulp.parallel(
npx("webpack", ["--watch", "--mode", "development"]),
npx("hugo", ["--watch", "--buildDrafts", "--buildFuture", "--verbose"]),
startServer,
gulp.task("serve", gulp.series(
clean,
gulp.parallel(
npx("webpack", ["--watch", "--mode", "development"]),
npx("hugo", ["--watch", "--buildDrafts", "--buildFuture", "--verbose"]),
startServer,
),
));
gulp.task("clean", clean);
function clean() {
return del([
"public/",
"builds/",
"_vendor/",
"static/assets/",
]);
}
function startServer() {
const browserSync = BrowserSync.create();
const publicDir = path.resolve(__dirname, "public");
@@ -97,15 +109,6 @@ function optimizeImages() {
.pipe(gulp.dest(".", { overwrite: true }));
}
function clean() {
return del([
"public/",
"builds/",
"_vendor/",
"static/assets/",
]);
}
// run a locally installed (i.e. ./node_modules/.bin/foo) binary, similar to a package.json script
function npx(bin, args) {
// WARNING: MAJOR HACKS AHEAD: