From 099d5637180f1f4bd1ff8b45782ddcad02ee3d15 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Thu, 16 Nov 2023 15:46:19 +0100 Subject: [PATCH] updates --- bun.lockb | Bin 15545 -> 12273 bytes engine.mjs | 9 ++------- index.html | 24 ++++++++++++------------ package.json | 9 +++------ presi.md => presentation.md | 2 +- src/example.ts => snippets/sum.ts | 0 tsconfig.json | 16 ---------------- 7 files changed, 18 insertions(+), 42 deletions(-) rename presi.md => presentation.md (94%) rename src/example.ts => snippets/sum.ts (100%) delete mode 100644 tsconfig.json diff --git a/bun.lockb b/bun.lockb index c6350cc7dc95dcea1c2709346c1b10339c8818e8..7497cd9905f65b287f59183c88aee4a7ddc827c8 100755 GIT binary patch delta 2426 zcmb_edu)?c6u;lsc5SzH??>BpTUTIXVjtVw1B9{|FtEzQAeK!9OE-M>duhxiNiG>ThA3C;cYO6ov`Sf!yPEFp~|J>D!iE}@_K6xVG7Rs={ z;?M82+hatChDanFX%oVRi9{iy9f3$As7R8gc}Z0Z+se~?3>Xi)GC78W;Mw43fC<0} z*ro!n0F!|YZNWfupuQp49NH4XoL(!0aRC%H_+SSDn%DuzfqP+O1a<+FfK7om=Z5A$ z;~sFfiwfE(6?)wIn0h-f9n-<4K=US;sBZY=nxZ51jyJE3gk>_w;|7hsDyX@p(^86N ziCitns`JWyg6aTPiMj#LNHhf4Bat=EYrKh~<|9ZP6=*As3s5pMox(c6o(9uUKvQWv z2j&GcD9of0q6SQ+9$lsE*HE|KYdna_D#Zbl#tUGjiUWsELGkmz^z1IL)>5~@Ydnm} z$1o}Ldh)22tVXYKwk~EVQ30Z?2V0~>;h4Q(yn>4et z)Mz_VH*XhjrNCB*GzgEo5v7Vu2!2hG1>x~uko_$XMn0z;CpU&Jk%tc+cOx6*E3@|? z-A>ByWNiV2(J^hs$feAL@cb-@I(VMte=2jm68C=fKcLQkl*a+MTu$^~%bdm9f@v!U zkOw1|@>iL3DY>1FrTM5U#YCobpQNGMbU!Ug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engine.mjs +++ b/engine.mjs @@ -1,8 +1,3 @@ -import include from 'markdown-it-include' +import { importPlugin } from '@nicco.io/markdown-it-import' -const options = { - includeRe: /#include(.+)/, - bracesAreOptional: true, -} - -export default ({ marp }) => marp.use(include, options) +export default ({ marp }) => marp.use(importPlugin) diff --git a/index.html b/index.html index b57a90d..5fc27db 100644 --- a/index.html +++ b/index.html @@ -21,17 +21,17 @@ palette in :root /* Code blok */div#\:\$p>svg>foreignObject>section .hljs-comment{color:var(--muted)}div#\:\$p>svg>foreignObject>section .hljs-attr{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-punctuation{color:var(--subtle)}div#\:\$p>svg>foreignObject>section .hljs-string{color:var(--gold)}div#\:\$p>svg>foreignObject>section .hljs-title{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-keyword{color:var(--pine)}div#\:\$p>svg>foreignObject>section .hljs-variable{color:var(--text)}div#\:\$p>svg>foreignObject>section .hljs-literal{color:var(--rose)}div#\:\$p>svg>foreignObject>section .hljs-type{color:var(--love)}div#\:\$p>svg>foreignObject>section .hljs-number{color:var(--gold)}div#\:\$p>svg>foreignObject>section .hljs-built_in{color:var(--love)}div#\:\$p>svg>foreignObject>section .hljs-params{color:var(--iris)}div#\:\$p>svg>foreignObject>section .hljs-symbol{color:var(--foam)}div#\:\$p>svg>foreignObject>section .hljs-meta{color:var(--subtle)} -/* @theme 7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6 */div#\:\$p>svg>foreignObject>section{justify-content:start}div#\:\$p>svg>foreignObject>section :is(pre,marp-pre){max-height:calc(100vh);overflow:auto}div#\:\$p>svg>foreignObject>section[data-marpit-scope-qoZH4qhv]{justify-content:center}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}
+;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;">

Some big title

Some subtitle

Some footer
@@ -41,12 +41,12 @@ pre { max-height: calc(100vh); overflow: auto; } -" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" data-marpit-pagination="2" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; } +" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" data-marpit-pagination="2" style="--footer:Some footer;--paginate:true;--style:section { justify-content: start; } pre { max-height: calc(100vh); overflow: auto; } -;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-pagination-total="4"> +;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-pagination-total="4">

This is very important

  • one
  • @@ -60,22 +60,22 @@ pre { max-height: calc(100vh); overflow: auto; } -" data-theme="7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6" lang="en-US" style="--style:section { justify-content: start; } +" data-theme="pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc" lang="en-US" style="--style:section { justify-content: start; } pre { max-height: calc(100vh); overflow: auto; } -;--theme:7jf8xgdya0acg0krqzqepgmnhuld862tfupi4me6qc6;" data-marpit-advanced-background="background">
+;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-advanced-background="content">

+;--theme:pryu9qxzzdb00besv9ts5uqofrllmif00ks1s53ygcfc;" data-marpit-pagination-total="4">

Some code

function add(a: number, b: number) {
   return a + b
diff --git a/package.json b/package.json
index b1578b4..8c18d73 100644
--- a/package.json
+++ b/package.json
@@ -1,16 +1,13 @@
 {
   "type": "module",
   "scripts": {
-    "build": "bunx @marp-team/marp-cli@latest presi.md",
+    "build": "bunx @marp-team/marp-cli@latest presentation.md",
     "dev": "conc bun:watch bun:serve",
     "serve": "bunx serve@latest . -p 80",
     "watch": "bun run build -w"
   },
   "devDependencies": {
-    "@tsconfig/strictest": "latest",
-    "bun-types": "latest",
-    "concurrently": "^8.2.2",
-    "markdown-it-include": "^2.0.0",
-    "typescript": "latest"
+    "@nicco.io/markdown-it-import": "latest",
+    "concurrently": "latest"
   }
 }
diff --git a/presi.md b/presentation.md
similarity index 94%
rename from presi.md
rename to presentation.md
index 208d4d3..f000869 100644
--- a/presi.md
+++ b/presentation.md
@@ -42,5 +42,5 @@ _footer: ''
 # Some code
 
 ```ts
-#include(./src/example.ts)
+@import(./snippets/sum.ts)
 ```
diff --git a/src/example.ts b/snippets/sum.ts
similarity index 100%
rename from src/example.ts
rename to snippets/sum.ts
diff --git a/tsconfig.json b/tsconfig.json
deleted file mode 100644
index 52cd1fc..0000000
--- a/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
-  "extends": ["@tsconfig/strictest"],
-  "compilerOptions": {
-    "lib": ["ESNext"],
-    "module": "esnext",
-    "target": "esnext",
-    "moduleResolution": "bundler",
-    "moduleDetection": "force",
-    "allowImportingTsExtensions": true,
-    "noEmit": true,
-    "composite": true,
-    "types": [
-      "bun-types" // add Bun global
-    ]
-  }
-}