Commit 56d07e07 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Renomme "images" en "assets" (et inclut les SVG).

parent b516acc0
......@@ -5,14 +5,17 @@ const pandoc = require("gulp-pandoc");
const SRC_DIR = process.env.SRC || "src";
const DEST_DIR = process.env.OUTPUT || "public/";
const ASSET_GLOB = `${SRC_DIR}/**/*.{png,gif,jpg,svg}`;
const PREZ_GLOB = `${SRC_DIR}/**/index.md`;
const assets = () => src(ASSET_GLOB).pipe(dest(DEST_DIR));
const REVEALJS_URL =
process.env.REVEALJS_URL ||
"https://pole-is.gitlab.irstea.page/tools/reveal.js";
const images = () => src(`${SRC_DIR}/**/*.{png,gif,jpg}`).pipe(dest(DEST_DIR));
const prez = () =>
src(`${SRC_DIR}/**/index.md`)
src(PREZ_GLOB)
.pipe(
pandoc({
from:
......@@ -37,7 +40,7 @@ const prez = () =>
)
.pipe(dest(DEST_DIR));
exports.default = exports.build = parallel(images, prez);
exports.default = exports.build = parallel(assets, prez);
const serve = () => {
src(DEST_DIR).pipe(
......@@ -49,9 +52,7 @@ const serve = () => {
);
};
const watch_prez = () =>
watch(`${SRC_DIR}/**/index.md`, { ignoreInitial: false }, prez);
const watch_images = () =>
watch(`${SRC_DIR}/**/*.{png,gif,jpg}`, { ignoreInitial: false }, images);
const watch_prez = () => watch(PREZ_GLOB, { ignoreInitial: false }, prez);
const watch_assets = () => watch(ASSET_GLOB, { ignoreInitial: false }, assets);
exports.dev = parallel(serve, watch_prez, watch_images);
exports.dev = parallel(serve, watch_prez, watch_assets);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment