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:
29
gulpfile.js
29
gulpfile.js
@@ -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:
|
||||
|
Reference in New Issue
Block a user