@slidev/cli 0.49.19 → 0.49.21
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.
|
@@ -7183,7 +7183,7 @@ var require_dist = __commonJS({
|
|
|
7183
7183
|
});
|
|
7184
7184
|
|
|
7185
7185
|
// package.json
|
|
7186
|
-
var version = "0.49.
|
|
7186
|
+
var version = "0.49.21";
|
|
7187
7187
|
|
|
7188
7188
|
// node/commands/shared.ts
|
|
7189
7189
|
import { existsSync as existsSync7, promises as fs9 } from "node:fs";
|
|
@@ -8326,6 +8326,7 @@ function createSlidesLoader(options, serverOptions) {
|
|
|
8326
8326
|
}
|
|
8327
8327
|
return {
|
|
8328
8328
|
name: "slidev:loader",
|
|
8329
|
+
enforce: "pre",
|
|
8329
8330
|
configureServer(_server) {
|
|
8330
8331
|
server = _server;
|
|
8331
8332
|
updateServerWatcher();
|
|
@@ -8375,8 +8376,9 @@ function createSlidesLoader(options, serverOptions) {
|
|
|
8375
8376
|
async handleHotUpdate(ctx) {
|
|
8376
8377
|
if (!data.watchFiles.includes(ctx.file))
|
|
8377
8378
|
return;
|
|
8378
|
-
await
|
|
8379
|
-
|
|
8379
|
+
const newData = await serverOptions.loadData?.({
|
|
8380
|
+
[ctx.file]: await ctx.read()
|
|
8381
|
+
});
|
|
8380
8382
|
if (!newData)
|
|
8381
8383
|
return [];
|
|
8382
8384
|
if (skipHmr && newData.markdownFiles[skipHmr.filePath]?.raw === skipHmr.fileContent) {
|
|
@@ -8540,6 +8542,8 @@ function createSlidesLoader(options, serverOptions) {
|
|
|
8540
8542
|
};
|
|
8541
8543
|
}
|
|
8542
8544
|
}
|
|
8545
|
+
if (data.markdownFiles[id])
|
|
8546
|
+
return "";
|
|
8543
8547
|
}
|
|
8544
8548
|
};
|
|
8545
8549
|
}
|
|
@@ -9318,6 +9322,8 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
|
9318
9322
|
transforms: {
|
|
9319
9323
|
...mdOptions?.transforms,
|
|
9320
9324
|
before(code, id) {
|
|
9325
|
+
if (options.data.markdownFiles[id])
|
|
9326
|
+
return "";
|
|
9321
9327
|
code = mdOptions?.transforms?.before?.(code, id) ?? code;
|
|
9322
9328
|
const match = id.match(regexSlideSourceId);
|
|
9323
9329
|
if (!match)
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TBJFVB6Q.js";
|
|
4
4
|
import {
|
|
5
5
|
getThemeMeta,
|
|
6
6
|
loadSetups,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveTheme,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I465XJNL.js";
|
|
13
13
|
import "./chunk-6DS3IPOB.js";
|
|
14
14
|
import {
|
|
15
15
|
getRoots,
|
|
@@ -155,9 +155,9 @@ cli.command(
|
|
|
155
155
|
logLevel: log
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
|
-
async loadData() {
|
|
158
|
+
async loadData(loadedSource) {
|
|
159
159
|
const { data: oldData, entry: entry2 } = options;
|
|
160
|
-
const loaded = await parser.load(options.userRoot, entry2,
|
|
160
|
+
const loaded = await parser.load(options.userRoot, entry2, loadedSource, "dev");
|
|
161
161
|
const themeRaw = theme || loaded.headmatter.theme || "default";
|
|
162
162
|
if (options.themeRaw !== themeRaw) {
|
|
163
163
|
console.log(yellow("\n restarting on theme change\n"));
|
|
@@ -335,7 +335,7 @@ cli.command(
|
|
|
335
335
|
}).strict().help(),
|
|
336
336
|
async (args) => {
|
|
337
337
|
const { entry, theme, base, download, out, inspect } = args;
|
|
338
|
-
const { build } = await import("./build-
|
|
338
|
+
const { build } = await import("./build-XZTXP6QT.js");
|
|
339
339
|
for (const entryFile of entry) {
|
|
340
340
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
341
341
|
if (download && !options.data.config.download)
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TBJFVB6Q.js";
|
|
4
4
|
import {
|
|
5
5
|
ViteSlidevPlugin,
|
|
6
6
|
createDataUtils,
|
|
7
7
|
parser,
|
|
8
8
|
resolveOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-I465XJNL.js";
|
|
10
10
|
import "./chunk-6DS3IPOB.js";
|
|
11
11
|
import "./chunk-2BABGNMX.js";
|
|
12
12
|
import "./chunk-JSBRDJBE.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.49.
|
|
4
|
+
"version": "0.49.21",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@antfu/ni": "^0.
|
|
45
|
+
"@antfu/ni": "^0.22.0",
|
|
46
46
|
"@antfu/utils": "^0.7.10",
|
|
47
47
|
"@iconify-json/carbon": "^1.1.36",
|
|
48
48
|
"@iconify-json/ph": "^1.1.13",
|
|
49
49
|
"@iconify-json/svg-spinners": "^1.1.2",
|
|
50
50
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
51
|
-
"@shikijs/markdown-it": "^1.
|
|
52
|
-
"@shikijs/twoslash": "^1.
|
|
53
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
51
|
+
"@shikijs/markdown-it": "^1.11.1",
|
|
52
|
+
"@shikijs/twoslash": "^1.11.0",
|
|
53
|
+
"@shikijs/vitepress-twoslash": "^1.11.1",
|
|
54
54
|
"@unocss/extractor-mdc": "^0.61.5",
|
|
55
55
|
"@unocss/reset": "^0.61.5",
|
|
56
56
|
"@vitejs/plugin-vue": "^5.0.5",
|
|
@@ -90,11 +90,11 @@
|
|
|
90
90
|
"resolve-from": "^5.0.0",
|
|
91
91
|
"resolve-global": "^2.0.0",
|
|
92
92
|
"semver": "^7.6.3",
|
|
93
|
-
"shiki": "^1.
|
|
93
|
+
"shiki": "^1.11.1",
|
|
94
94
|
"shiki-magic-move": "^0.4.3",
|
|
95
95
|
"sirv": "^2.0.4",
|
|
96
96
|
"source-map-js": "^1.2.0",
|
|
97
|
-
"typescript": "^5.5.
|
|
97
|
+
"typescript": "^5.5.4",
|
|
98
98
|
"unocss": "^0.61.5",
|
|
99
99
|
"unplugin-icons": "^0.19.0",
|
|
100
100
|
"unplugin-vue-components": "^0.27.3",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"vitefu": "^0.2.5",
|
|
110
110
|
"vue": "^3.4.33",
|
|
111
111
|
"yargs": "^17.7.2",
|
|
112
|
-
"@slidev/parser": "0.49.
|
|
113
|
-
"@slidev/
|
|
114
|
-
"@slidev/
|
|
112
|
+
"@slidev/parser": "0.49.21",
|
|
113
|
+
"@slidev/types": "0.49.21",
|
|
114
|
+
"@slidev/client": "0.49.21"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|