aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.babel.js
diff options
context:
space:
mode:
authorMathias Biilmann <info@mathias-biilmann.net>2017-12-07 10:20:11 -0800
committerGitHub <noreply@github.com>2017-12-07 10:20:11 -0800
commit8745627e7d171b4b1fd2062b4328bf23899663e9 (patch)
tree5f0399bf843f5a3055e0bb6d3da6774b1a01f307 /gulpfile.babel.js
parent2db9a63c54df63e95c1fbf39391d201c98a62b86 (diff)
parenta4bfd44601069a1b054c396ad754c8a2b7ec688c (diff)
Merge pull request #11 from netlify-templates/update-for-cms-1-0
Update for CMS 1.0
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"]);
});