En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

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

Utilise la version de @devatscience/reveal.js publiée sur NPM.

parent 9200a003
import { ASSET_GLOB, DEST_DIR, GRAPH_GLOB, PDF_GLOB, PREZ_GLOB, REVEALJS_URL } from "./config";
import { dest, lastRun, parallel, series, src } from "gulp";
import autoindex from "./plugins/autoindex";
import { build_revealjs } from "./revealjs";
import del from "del";
import drawio from "./plugins/drawio";
import pandoc from "./plugins/pandoc";
import spy from "./plugins/spy";
import wkhtmltopdf from "./plugins/wkhtmltopdf";
import del from 'del';
import { dest, lastRun, parallel, series, src } from 'gulp';
import { ASSET_GLOB, DEST_DIR, GRAPH_GLOB, PDF_GLOB, PREZ_GLOB, REVEALJS_URL } from './config';
import autoindex from './plugins/autoindex';
import drawio from './plugins/drawio';
import pandoc from './plugins/pandoc';
import spy from './plugins/spy';
import wkhtmltopdf from './plugins/wkhtmltopdf';
import revealjs from './revealjs';
export const clean = () => del(`${DEST_DIR}/**`, { force: true });
......@@ -28,7 +29,7 @@ export const pdf = () => src(PDF_GLOB).pipe(wkhtmltopdf()).pipe(dest(DEST_DIR)).
export const build = series(
clean,
parallel(build_revealjs, assets, prez, graphs),
parallel(revealjs, assets, prez, graphs),
pdf
);
......
import { ASSET_GLOB, DEST_DIR, GRAPH_GLOB, PREZ_GLOB } from "./config";
import build, { assets, graphs, pdf, prez } from "./build";
import { parallel, series, src, watch } from "gulp";
import server from "gulp-server-livereload";
import { watch_revealjs } from "./revealjs";
import { parallel, series, src, watch } from 'gulp';
import server from 'gulp-server-livereload';
import build, { assets, graphs, pdf, prez } from './build';
import { ASSET_GLOB, DEST_DIR, GRAPH_GLOB, PREZ_GLOB } from './config';
import revealjs from './revealjs';
const serve = () => {
src(DEST_DIR).pipe(
......@@ -24,15 +25,14 @@ const watch_pdf = () => watch(`${DEST_DIR}/**/*.{html,svg,jpg,gif,png}`, pdf);
export const dev = series(
build,
revealjs,
parallel(
serve,
watch_prez,
watch_assets,
watch_graphs,
watch_pdf,
watch_revealjs
)
);
export default dev;
import * as revealJS from "@inrae/reveal.js/gulpfile.esm";
import { dest, lastRun, parallel, series, src, watch } from "gulp";
import { DEST_DIR, REVEALJS_URL } from "./config";
import logger from "gulplog";
import { magenta } from "gulp-cli/lib/shared/ansi";
import path from "path";
import spy from "./plugins/spy";
const noop = () => Promise.resolve(false);
export const [build_revealjs, watch_revealjs] = (function (url) {
if (url.startsWith("http")) {
logger.info(`Using remote reveal.js at ${magenta(REVEALJS_URL)} ($REVEALJS_URL)`);
return [noop, noop];
}
const _SRC_DIR = path.normalize(`${__dirname}/../node_modules/@inrae/reveal.js/public`);
import { dest, lastRun, src } from 'gulp';
import { magenta } from 'gulp-cli/lib/shared/ansi';
import logger from 'gulplog';
import path from 'path';
import { DEST_DIR, REVEALJS_URL } from './config';
import spy from './plugins/spy';
let revealjs = () => Promise.resolve(false)
if (REVEALJS_URL.startsWith("http")) {
logger.info(`Using remote reveal.js at ${magenta(REVEALJS_URL)} ($REVEALJS_URL)`);
} else {
const _SRC_DIR = path.normalize(`${__dirname}/../node_modules/@devatscience/reveal.js`);
const SRC = `${_SRC_DIR}/**`;
const DST = path.normalize(DEST_DIR + "/" + url);
const DST = path.normalize(DEST_DIR + "/" + REVEALJS_URL);
logger.info(`Using local ${DEST_DIR}/${magenta(path.relative(DEST_DIR, DST))} from ${path.relative(__dirname + '/..', _SRC_DIR + '/..')} ($REVEALJS_URL)`);
const copy_revealjs = () =>
src(SRC, { since: lastRun(copy_revealjs) }).pipe(dest(DST)).pipe(spy());
const _watch_revealjs = () => watch(SRC, copy_revealjs);
revealjs = () =>
src([SRC, "!**/package.json"], { since: lastRun(revealjs) }).pipe(dest(DST)).pipe(spy());
logger.info(`Building local ${DEST_DIR}/${magenta(path.relative(DEST_DIR, DST))} from ${path.relative(__dirname + '/..', _SRC_DIR + '/..')} ($REVEALJS_URL)`);
}
return [
series(revealJS.build, copy_revealjs),
parallel(revealJS.dev, _watch_revealjs),
];
})(REVEALJS_URL);
export default revealjs;
This diff is collapsed.
......@@ -24,7 +24,7 @@
"node": ">=12 <14"
},
"dependencies": {
"@inrae/reveal.js": "git+https://gitlab.irstea.fr/pole-is/tools/reveal.js.git#semver:^2.0",
"@devatscience/reveal.js": "^2.0.0",
"del": "^5.1.0",
"esm": "^3.2.25",
"gulp": "^4.0.2",
......
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