vite-plugin-react-deck 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +6 -2
- package/index.mjs +6 -2
- package/package.json +3 -2
package/index.cjs
CHANGED
|
@@ -55,6 +55,7 @@ function extractMainCodeAsChildren(source) {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// src/slides.ts
|
|
58
|
+
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
58
59
|
async function transformSlidesMdxToReact(sourceContent, {
|
|
59
60
|
production: isProd,
|
|
60
61
|
...options
|
|
@@ -63,7 +64,7 @@ async function transformSlidesMdxToReact(sourceContent, {
|
|
|
63
64
|
const { content: finalContent, inlineModules } = extractInlineModules(
|
|
64
65
|
normalizeNewline(content)
|
|
65
66
|
);
|
|
66
|
-
const slides = finalContent.split("
|
|
67
|
+
const slides = finalContent.split("---\n");
|
|
67
68
|
const enrichedSlides = [];
|
|
68
69
|
const LAYOUT_REGEX = /\S*\nlayout: (.*)/g;
|
|
69
70
|
let frontmatterForNextSlide = null;
|
|
@@ -88,6 +89,7 @@ ${slide}
|
|
|
88
89
|
outputFormat: "program",
|
|
89
90
|
jsx: !isProd,
|
|
90
91
|
providerImportSource: "@mdx-js/react",
|
|
92
|
+
remarkPlugins: [import_remark_gfm.default],
|
|
91
93
|
...options
|
|
92
94
|
});
|
|
93
95
|
const mainCode = extractMainCodeAsChildren(result.value.toString());
|
|
@@ -269,8 +271,10 @@ var src_default = (options) => {
|
|
|
269
271
|
});
|
|
270
272
|
return contentIndex;
|
|
271
273
|
}
|
|
272
|
-
if (!id.endsWith("deck.mdx"))
|
|
274
|
+
if (!id.endsWith("deck.mdx")) {
|
|
275
|
+
console.log("passing");
|
|
273
276
|
return;
|
|
277
|
+
}
|
|
274
278
|
const content = await fs.readFile(id, "utf-8");
|
|
275
279
|
const data = await transformSlidesMdxToReact(content, {
|
|
276
280
|
production: isProd,
|
package/index.mjs
CHANGED
|
@@ -32,6 +32,7 @@ function extractMainCodeAsChildren(source) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// src/slides.ts
|
|
35
|
+
import remarkGfm from "remark-gfm";
|
|
35
36
|
async function transformSlidesMdxToReact(sourceContent, {
|
|
36
37
|
production: isProd,
|
|
37
38
|
...options
|
|
@@ -40,7 +41,7 @@ async function transformSlidesMdxToReact(sourceContent, {
|
|
|
40
41
|
const { content: finalContent, inlineModules } = extractInlineModules(
|
|
41
42
|
normalizeNewline(content)
|
|
42
43
|
);
|
|
43
|
-
const slides = finalContent.split("
|
|
44
|
+
const slides = finalContent.split("---\n");
|
|
44
45
|
const enrichedSlides = [];
|
|
45
46
|
const LAYOUT_REGEX = /\S*\nlayout: (.*)/g;
|
|
46
47
|
let frontmatterForNextSlide = null;
|
|
@@ -65,6 +66,7 @@ ${slide}
|
|
|
65
66
|
outputFormat: "program",
|
|
66
67
|
jsx: !isProd,
|
|
67
68
|
providerImportSource: "@mdx-js/react",
|
|
69
|
+
remarkPlugins: [remarkGfm],
|
|
68
70
|
...options
|
|
69
71
|
});
|
|
70
72
|
const mainCode = extractMainCodeAsChildren(result.value.toString());
|
|
@@ -246,8 +248,10 @@ var src_default = (options) => {
|
|
|
246
248
|
});
|
|
247
249
|
return contentIndex;
|
|
248
250
|
}
|
|
249
|
-
if (!id.endsWith("deck.mdx"))
|
|
251
|
+
if (!id.endsWith("deck.mdx")) {
|
|
252
|
+
console.log("passing");
|
|
250
253
|
return;
|
|
254
|
+
}
|
|
251
255
|
const content = await fs.readFile(id, "utf-8");
|
|
252
256
|
const data = await transformSlidesMdxToReact(content, {
|
|
253
257
|
production: isProd,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-react-deck",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.cjs",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@mdx-js/mdx": "^3.0.0",
|
|
26
26
|
"@mdx-js/react": "^3.0.0",
|
|
27
27
|
"glob": "^10.3.10",
|
|
28
|
-
"gray-matter": "^4.0.3"
|
|
28
|
+
"gray-matter": "^4.0.3",
|
|
29
|
+
"remark-gfm": "^4.0.0"
|
|
29
30
|
}
|
|
30
31
|
}
|