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

Ne retraite que les fichiers modifiéd en mode dev.

Sauf les PDF, parce qu'on ne piste pas les dépendences.
parent 9df2d82d
import { dest, parallel, series, src, watch } from "gulp";
import { dest, lastRun, parallel, series, src, watch } from "gulp";
import del from "del";
import drawio from "./lib/drawio";
import index from "./lib/index";
......@@ -19,10 +19,17 @@ const PDF_GLOB = `${DEST_DIR}/**/index.html`;
export const clean = () => del(`${DEST_DIR}/**`, { force: true });
export const assets = () => src(ASSET_GLOB).pipe(dest(DEST_DIR));
export const assets = () =>
src(ASSET_GLOB, { since: lastRun(assets) }).pipe(dest(DEST_DIR));
export const prez = () =>
src(PREZ_GLOB).pipe(index()).pipe(pandoc()).pipe(dest(DEST_DIR));
export const graphs = () => src(GRAPH_GLOB).pipe(drawio()).pipe(dest(DEST_DIR));
src(PREZ_GLOB, { since: lastRun(prez) })
.pipe(index())
.pipe(pandoc())
.pipe(dest(DEST_DIR));
export const graphs = () =>
src(GRAPH_GLOB, { since: lastRun(graphs) })
.pipe(drawio())
.pipe(dest(DEST_DIR));
export const pdf = () => src(PDF_GLOB).pipe(wkhtmltopdf()).pipe(dest(DEST_DIR));
export const build = series(clean, parallel(assets, prez, graphs), pdf);
......
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