aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.babel.js')
-rw-r--r--gulpfile.babel.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index d1420f2..a93dc8a 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -17,6 +17,10 @@ const browserSync = BrowserSync.create();
const hugoBin = `./bin/hugo.${process.platform === "win32" ? "exe" : process.platform}`;
const defaultArgs = ["-d", "../dist", "-s", "site"];
+if (process.env.DEBUG) {
+ defaultArgs.unshift("--debug")
+}
+
gulp.task("hugo", (cb) => buildSite(cb));
gulp.task("hugo-preview", (cb) => buildSite(cb, ["--buildDrafts", "--buildFuture"]));
gulp.task("build", ["css", "js", "cms-assets", "hugo"]);
@@ -54,7 +58,7 @@ gulp.task("js", (cb) => {
gulp.task("svg", () => {
const svgs = gulp
- .src("site/static/img/icons/*.svg")
+ .src("site/static/img/icons-*.svg")
.pipe(svgmin())
.pipe(svgstore({inlineSvg: true}));
@@ -76,7 +80,7 @@ gulp.task("server", ["hugo", "css", "cms-assets", "js", "svg"], () => {
});
gulp.watch("./src/js/**/*.js", ["js"]);
gulp.watch("./src/css/**/*.css", ["css"]);
- gulp.watch("./site/static/img/icons/*.svg", ["svg"]);
+ gulp.watch("./site/static/img/icons-*.svg", ["svg"]);
gulp.watch("./site/**/*", ["hugo"]);
});