@slidev/parser 0.49.21 → 0.49.23
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/dist/fs.mjs +3 -1
- package/package.json +2 -2
package/dist/fs.mjs
CHANGED
|
@@ -40,6 +40,7 @@ async function load(userRoot, filepath, loadedSource = {}, mode) {
|
|
|
40
40
|
extensions = await preparserExtensionLoader(o, filepath, mode);
|
|
41
41
|
}
|
|
42
42
|
const markdownFiles = {};
|
|
43
|
+
const watchFiles = {};
|
|
43
44
|
const slides = [];
|
|
44
45
|
async function loadMarkdown(path, range, frontmatterOverride, importers) {
|
|
45
46
|
let md = markdownFiles[path];
|
|
@@ -47,6 +48,7 @@ async function load(userRoot, filepath, loadedSource = {}, mode) {
|
|
|
47
48
|
const raw = loadedSource[path] ?? fs.readFileSync(path, "utf-8");
|
|
48
49
|
md = await parse(raw, path, extensions);
|
|
49
50
|
markdownFiles[path] = md;
|
|
51
|
+
watchFiles[path] = /* @__PURE__ */ new Set();
|
|
50
52
|
}
|
|
51
53
|
const directImporter = importers?.at(-1);
|
|
52
54
|
for (const index of parseRangeString(md.slides.length, range)) {
|
|
@@ -111,7 +113,7 @@ async function load(userRoot, filepath, loadedSource = {}, mode) {
|
|
|
111
113
|
headmatter,
|
|
112
114
|
features: detectFeatures(slides.map((s) => s.source.raw).join("")),
|
|
113
115
|
markdownFiles,
|
|
114
|
-
watchFiles
|
|
116
|
+
watchFiles
|
|
115
117
|
};
|
|
116
118
|
}
|
|
117
119
|
async function save(markdown) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/parser",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.23",
|
|
4
4
|
"description": "Markdown parser for Slidev",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@antfu/utils": "^0.7.10",
|
|
40
40
|
"yaml": "^2.4.5",
|
|
41
|
-
"@slidev/types": "0.49.
|
|
41
|
+
"@slidev/types": "0.49.23"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "rimraf dist && tsup src/index.ts src/core.ts src/fs.ts",
|