From 9fe6d8d585551033458b1537f8c0d4200760baae Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 28 Mar 2024 11:07:57 +0100 Subject: [PATCH] switch from gulp to vite to build, add types for reveal.js config --- css/reset.css | 30 + css/theme/{source => }/beige.scss | 6 +- css/theme/{source => }/black-contrast.scss | 6 +- css/theme/{source => }/black.scss | 8 +- css/theme/{source => }/blood.scss | 6 +- css/theme/{source => }/dracula.scss | 6 +- css/theme/{source => }/league.scss | 6 +- css/theme/{source => }/moon.scss | 6 +- css/theme/{source => }/night.scss | 6 +- css/theme/{source => }/serif.scss | 6 +- css/theme/{source => }/simple.scss | 6 +- css/theme/{source => }/sky.scss | 6 +- css/theme/{source => }/solarized.scss | 6 +- css/theme/{source => }/white-contrast.scss | 6 +- css/theme/{source => }/white.scss | 6 +- demo.html | 12 +- dist/config.d.ts | 84 + dist/index.d.ts | 12 + dist/plugin/highlight.js | 18 + dist/plugin/highlight.mjs | 47979 ++++++++++++++++ {plugin => dist/plugin}/highlight/monokai.css | 0 {plugin => dist/plugin}/highlight/zenburn.css | 0 dist/plugin/markdown.js | 54 + dist/plugin/markdown.mjs | 1738 + dist/plugin/math.js | 4 + dist/plugin/math.mjs | 119 + dist/plugin/notes.js | 944 + dist/plugin/notes.mjs | 2548 + dist/plugin/search.js | 7 + dist/plugin/search.mjs | 83 + dist/plugin/zoom.js | 9 + dist/plugin/zoom.mjs | 102 + dist/reset.css | 31 +- dist/reveal.css | 9 +- dist/reveal.d.mts | 3 + dist/reveal.esm.js | 9 - dist/reveal.esm.js.map | 1 - dist/reveal.js | 38 +- dist/reveal.js.map | 1 - dist/reveal.mjs | 3494 ++ dist/theme/beige.css | 366 - dist/theme/black-contrast.css | 362 - dist/theme/black.css | 360 +- dist/theme/blood.css | 392 - dist/theme/dracula.css | 385 - dist/theme/league.css | 368 - dist/theme/moon.css | 362 - dist/theme/night.css | 360 - dist/theme/serif.css | 363 - dist/theme/simple.css | 362 - dist/theme/sky.css | 370 - dist/theme/solarized.css | 363 - dist/theme/white-contrast.css | 362 - dist/theme/white.css | 359 - ...hite_contrast_compact_verbatim_headers.css | 360 - index.html | 28 +- js/config.js | 330 - js/config.ts | 648 + js/{index.js => index.ts} | 11 +- js/reveal.js | 2 +- package-lock.json | 1259 +- package.json | 47 +- plugin/highlight/highlight.esm.js | 5 - plugin/highlight/highlight.js | 5 - plugin/highlight/{plugin.js => index.js} | 0 plugin/highlight/vite.config.ts | 22 + plugin/markdown/{plugin.js => index.js} | 0 plugin/markdown/markdown.esm.js | 7 - plugin/markdown/markdown.js | 7 - plugin/markdown/vite.config.ts | 22 + plugin/math/{plugin.js => index.js} | 0 plugin/math/math.esm.js | 6 - plugin/math/math.js | 1 - plugin/math/vite.config.ts | 22 + plugin/notes/{plugin.js => index.js} | 2 +- plugin/notes/notes.esm.js | 1 - plugin/notes/notes.js | 1 - plugin/notes/vite.config.ts | 22 + plugin/search/{plugin.js => index.js} | 0 plugin/search/search.esm.js | 7 - plugin/search/search.js | 7 - plugin/search/vite.config.ts | 22 + plugin/zoom/{plugin.js => index.js} | 0 plugin/zoom/vite.config.ts | 22 + plugin/zoom/zoom.esm.js | 11 - plugin/zoom/zoom.js | 11 - public/plugin/highlight/monokai.css | 71 + public/plugin/highlight/zenburn.css | 80 + public/theme/fonts/league-gothic/LICENSE | 2 + .../fonts/league-gothic/league-gothic.css | 10 + .../fonts/league-gothic/league-gothic.eot | Bin 0 -> 25696 bytes .../fonts/league-gothic/league-gothic.ttf | Bin 0 -> 64256 bytes .../fonts/league-gothic/league-gothic.woff | Bin 0 -> 30764 bytes public/theme/fonts/source-sans-pro/LICENSE | 45 + .../source-sans-pro-italic.eot | Bin 0 -> 75720 bytes .../source-sans-pro-italic.ttf | Bin 0 -> 238084 bytes .../source-sans-pro-italic.woff | Bin 0 -> 98556 bytes .../source-sans-pro-regular.eot | Bin 0 -> 88070 bytes .../source-sans-pro-regular.ttf | Bin 0 -> 288008 bytes .../source-sans-pro-regular.woff | Bin 0 -> 114324 bytes .../source-sans-pro-semibold.eot | Bin 0 -> 89897 bytes .../source-sans-pro-semibold.ttf | Bin 0 -> 284640 bytes .../source-sans-pro-semibold.woff | Bin 0 -> 115648 bytes .../source-sans-pro-semibolditalic.eot | Bin 0 -> 75706 bytes .../source-sans-pro-semibolditalic.ttf | Bin 0 -> 240944 bytes .../source-sans-pro-semibolditalic.woff | Bin 0 -> 98816 bytes .../fonts/source-sans-pro/source-sans-pro.css | 39 + test/test-markdown.html | 6 +- test/test-multiple-instances.html | 4 +- tsconfig.json | 25 + tsconfig.node.json | 11 + vite.config.styles.ts | 20 + vite.config.ts | 42 + 113 files changed, 59696 insertions(+), 6096 deletions(-) create mode 100644 css/reset.css rename css/theme/{source => }/beige.scss (93%) rename css/theme/{source => }/black-contrast.scss (93%) rename css/theme/{source => }/black.scss (87%) rename css/theme/{source => }/blood.scss (95%) rename css/theme/{source => }/dracula.scss (95%) rename css/theme/{source => }/league.scss (92%) rename css/theme/{source => }/moon.scss (92%) rename css/theme/{source => }/night.scss (91%) rename css/theme/{source => }/serif.scss (92%) rename css/theme/{source => }/simple.scss (93%) rename css/theme/{source => }/sky.scss (93%) rename css/theme/{source => }/solarized.scss (93%) rename css/theme/{source => }/white-contrast.scss (93%) rename css/theme/{source => }/white.scss (92%) create mode 100644 dist/config.d.ts create mode 100644 dist/index.d.ts create mode 100644 dist/plugin/highlight.js create mode 100644 dist/plugin/highlight.mjs rename {plugin => dist/plugin}/highlight/monokai.css (100%) rename {plugin => dist/plugin}/highlight/zenburn.css (100%) create mode 100644 dist/plugin/markdown.js create mode 100644 dist/plugin/markdown.mjs create mode 100644 dist/plugin/math.js create mode 100644 dist/plugin/math.mjs create mode 100644 dist/plugin/notes.js create mode 100644 dist/plugin/notes.mjs create mode 100644 dist/plugin/search.js create mode 100644 dist/plugin/search.mjs create mode 100644 dist/plugin/zoom.js create mode 100644 dist/plugin/zoom.mjs create mode 100644 dist/reveal.d.mts delete mode 100644 dist/reveal.esm.js delete mode 100644 dist/reveal.esm.js.map delete mode 100644 dist/reveal.js.map create mode 100644 dist/reveal.mjs delete mode 100644 dist/theme/beige.css delete mode 100644 dist/theme/black-contrast.css delete mode 100644 dist/theme/blood.css delete mode 100644 dist/theme/dracula.css delete mode 100644 dist/theme/league.css delete mode 100644 dist/theme/moon.css delete mode 100644 dist/theme/night.css delete mode 100644 dist/theme/serif.css delete mode 100644 dist/theme/simple.css delete mode 100644 dist/theme/sky.css delete mode 100644 dist/theme/solarized.css delete mode 100644 dist/theme/white-contrast.css delete mode 100644 dist/theme/white.css delete mode 100644 dist/theme/white_contrast_compact_verbatim_headers.css delete mode 100644 js/config.js create mode 100644 js/config.ts rename js/{index.js => index.ts} (84%) delete mode 100644 plugin/highlight/highlight.esm.js delete mode 100644 plugin/highlight/highlight.js rename plugin/highlight/{plugin.js => index.js} (100%) create mode 100644 plugin/highlight/vite.config.ts rename plugin/markdown/{plugin.js => index.js} (100%) delete mode 100644 plugin/markdown/markdown.esm.js delete mode 100644 plugin/markdown/markdown.js create mode 100644 plugin/markdown/vite.config.ts rename plugin/math/{plugin.js => index.js} (100%) delete mode 100644 plugin/math/math.esm.js delete mode 100644 plugin/math/math.js create mode 100644 plugin/math/vite.config.ts rename plugin/notes/{plugin.js => index.js} (99%) delete mode 100644 plugin/notes/notes.esm.js delete mode 100644 plugin/notes/notes.js create mode 100644 plugin/notes/vite.config.ts rename plugin/search/{plugin.js => index.js} (100%) delete mode 100644 plugin/search/search.esm.js delete mode 100644 plugin/search/search.js create mode 100644 plugin/search/vite.config.ts rename plugin/zoom/{plugin.js => index.js} (100%) create mode 100644 plugin/zoom/vite.config.ts delete mode 100644 plugin/zoom/zoom.esm.js delete mode 100644 plugin/zoom/zoom.js create mode 100644 public/plugin/highlight/monokai.css create mode 100644 public/plugin/highlight/zenburn.css create mode 100644 public/theme/fonts/league-gothic/LICENSE create mode 100644 public/theme/fonts/league-gothic/league-gothic.css create mode 100755 public/theme/fonts/league-gothic/league-gothic.eot create mode 100755 public/theme/fonts/league-gothic/league-gothic.ttf create mode 100755 public/theme/fonts/league-gothic/league-gothic.woff create mode 100644 public/theme/fonts/source-sans-pro/LICENSE create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-italic.eot create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-italic.ttf create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-italic.woff create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-regular.eot create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-regular.ttf create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-regular.woff create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibold.eot create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibold.ttf create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibold.woff create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.eot create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.ttf create mode 100755 public/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.woff create mode 100644 public/theme/fonts/source-sans-pro/source-sans-pro.css create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 vite.config.styles.ts create mode 100644 vite.config.ts diff --git a/css/reset.css b/css/reset.css new file mode 100644 index 00000000000..e2385390fcf --- /dev/null +++ b/css/reset.css @@ -0,0 +1,30 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v4.0 | 20180602 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +main, menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, main, menu, nav, section { + display: block; +} \ No newline at end of file diff --git a/css/theme/source/beige.scss b/css/theme/beige.scss similarity index 93% rename from css/theme/source/beige.scss rename to css/theme/beige.scss index 7598b94f82b..32d082509d5 100644 --- a/css/theme/source/beige.scss +++ b/css/theme/beige.scss @@ -6,8 +6,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -40,5 +40,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/black-contrast.scss b/css/theme/black-contrast.scss similarity index 93% rename from css/theme/source/black-contrast.scss rename to css/theme/black-contrast.scss index 9e1a2cafbe1..6d84e9596c9 100644 --- a/css/theme/source/black-contrast.scss +++ b/css/theme/black-contrast.scss @@ -9,8 +9,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -45,5 +45,5 @@ $heading4Size: 1.0em; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/black.scss b/css/theme/black.scss similarity index 87% rename from css/theme/source/black.scss rename to css/theme/black.scss index 7c655c4f98b..61a1abedf65 100644 --- a/css/theme/source/black.scss +++ b/css/theme/black.scss @@ -6,13 +6,13 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- // Include theme-specific fonts -@import url(./fonts/source-sans-pro/source-sans-pro.css); +@import url("/theme/fonts/source-sans-pro/source-sans-pro.css"); // Override theme settings (see ../template/settings.scss) @@ -42,5 +42,5 @@ $heading4Size: 1.0em; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/blood.scss b/css/theme/blood.scss similarity index 95% rename from css/theme/source/blood.scss rename to css/theme/blood.scss index b5a86796fc5..d1eecd67669 100644 --- a/css/theme/source/blood.scss +++ b/css/theme/blood.scss @@ -11,8 +11,8 @@ */ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- // Include theme-specific fonts @@ -51,7 +51,7 @@ $selectionColor: #fff; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- // some overrides after theme template import diff --git a/css/theme/source/dracula.scss b/css/theme/dracula.scss similarity index 95% rename from css/theme/source/dracula.scss rename to css/theme/dracula.scss index ae968b8c752..99402f86ccf 100644 --- a/css/theme/source/dracula.scss +++ b/css/theme/dracula.scss @@ -5,8 +5,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -74,7 +74,7 @@ $codeFont: "Fira Code", $systemFontsMono; @include light-bg-text-color($background); // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- // Define additional color effects based on Dracula spec diff --git a/css/theme/source/league.scss b/css/theme/league.scss similarity index 92% rename from css/theme/source/league.scss rename to css/theme/league.scss index ee012583990..8a5c43a6114 100644 --- a/css/theme/source/league.scss +++ b/css/theme/league.scss @@ -8,8 +8,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -32,5 +32,5 @@ $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/moon.scss b/css/theme/moon.scss similarity index 92% rename from css/theme/source/moon.scss rename to css/theme/moon.scss index 59ef0a95a7e..291945fc6a5 100644 --- a/css/theme/source/moon.scss +++ b/css/theme/moon.scss @@ -5,8 +5,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -50,5 +50,5 @@ $selectionBackgroundColor: $magenta; @include light-bg-text-color(#222); // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/night.scss b/css/theme/night.scss similarity index 91% rename from css/theme/source/night.scss rename to css/theme/night.scss index 98a206288f5..9f9e4a8bbf0 100644 --- a/css/theme/source/night.scss +++ b/css/theme/night.scss @@ -6,8 +6,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -33,5 +33,5 @@ $selectionBackgroundColor: #e7ad52; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- \ No newline at end of file diff --git a/css/theme/source/serif.scss b/css/theme/serif.scss similarity index 92% rename from css/theme/source/serif.scss rename to css/theme/serif.scss index babec4d1cae..a8587198a96 100644 --- a/css/theme/source/serif.scss +++ b/css/theme/serif.scss @@ -7,8 +7,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -37,5 +37,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/simple.scss b/css/theme/simple.scss similarity index 93% rename from css/theme/source/simple.scss rename to css/theme/simple.scss index 51a21af2615..81de6df695b 100644 --- a/css/theme/source/simple.scss +++ b/css/theme/simple.scss @@ -8,8 +8,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -39,5 +39,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- \ No newline at end of file diff --git a/css/theme/source/sky.scss b/css/theme/sky.scss similarity index 93% rename from css/theme/source/sky.scss rename to css/theme/sky.scss index 457e9e50924..e592bd191cf 100644 --- a/css/theme/source/sky.scss +++ b/css/theme/sky.scss @@ -6,8 +6,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -48,5 +48,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/solarized.scss b/css/theme/solarized.scss similarity index 93% rename from css/theme/source/solarized.scss rename to css/theme/solarized.scss index f3253458faa..f9aee127c5b 100644 --- a/css/theme/source/solarized.scss +++ b/css/theme/solarized.scss @@ -5,8 +5,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -62,5 +62,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/white-contrast.scss b/css/theme/white-contrast.scss similarity index 93% rename from css/theme/source/white-contrast.scss rename to css/theme/white-contrast.scss index e22007e23b4..24d35fdc376 100644 --- a/css/theme/source/white-contrast.scss +++ b/css/theme/white-contrast.scss @@ -9,8 +9,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -48,5 +48,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/css/theme/source/white.scss b/css/theme/white.scss similarity index 92% rename from css/theme/source/white.scss rename to css/theme/white.scss index a2b1292f4e8..f0b587b76fe 100644 --- a/css/theme/source/white.scss +++ b/css/theme/white.scss @@ -6,8 +6,8 @@ // Default mixins and settings ----------------- -@import "../template/mixins"; -@import "../template/settings"; +@import "./template/mixins"; +@import "./template/settings"; // --------------------------------------------- @@ -45,5 +45,5 @@ $overlayElementFgColor: 240, 240, 240; // Theme template ------------------------------ -@import "../template/theme"; +@import "./template/theme"; // --------------------------------------------- diff --git a/demo.html b/demo.html index 36d830281c1..d80907f1c2a 100644 --- a/demo.html +++ b/demo.html @@ -455,13 +455,19 @@

THE END

- + + + - - - - -