diff --git a/bun.lockb b/bun.lockb index c6350cc..7497cd9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/engine.mjs b/engine.mjs index 1db6ecc..a22502f 100644 --- a/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
-    ]
-  }
-}