@slidev/cli 0.50.0-beta.9 → 0.51.0-beta.1
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.
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-UNQ5DBLZ.js";
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
|
-
var version = "0.
|
|
12
|
+
var version = "0.51.0-beta.1";
|
|
13
13
|
|
|
14
14
|
// node/integrations/themes.ts
|
|
15
15
|
import { join } from "node:path";
|
|
@@ -39,7 +39,7 @@ import * as parser from "@slidev/parser/fs";
|
|
|
39
39
|
|
|
40
40
|
// node/options.ts
|
|
41
41
|
import path3 from "node:path";
|
|
42
|
-
import { uniq as uniq5 } from "@antfu/utils";
|
|
42
|
+
import { objectMap as objectMap2, uniq as uniq5 } from "@antfu/utils";
|
|
43
43
|
import Debug from "debug";
|
|
44
44
|
import fg4 from "fast-glob";
|
|
45
45
|
import mm from "micromatch";
|
|
@@ -2659,19 +2659,24 @@ async function createDataUtils(resolved) {
|
|
|
2659
2659
|
};
|
|
2660
2660
|
}
|
|
2661
2661
|
function getDefine(options) {
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2662
|
+
const matchMode = (mode) => mode === true || mode === options.mode;
|
|
2663
|
+
return objectMap2(
|
|
2664
|
+
{
|
|
2665
|
+
__DEV__: options.mode === "dev",
|
|
2666
|
+
__SLIDEV_CLIENT_ROOT__: toAtFS(options.clientRoot),
|
|
2667
|
+
__SLIDEV_HASH_ROUTE__: options.data.config.routerMode === "hash",
|
|
2668
|
+
__SLIDEV_FEATURE_DRAWINGS__: matchMode(options.data.config.drawings.enabled),
|
|
2669
|
+
__SLIDEV_FEATURE_EDITOR__: options.mode === "dev" && options.data.config.editor !== false,
|
|
2670
|
+
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: !!options.data.config.drawings.persist,
|
|
2671
|
+
__SLIDEV_FEATURE_RECORD__: matchMode(options.data.config.record),
|
|
2672
|
+
__SLIDEV_FEATURE_PRESENTER__: matchMode(options.data.config.presenter),
|
|
2673
|
+
__SLIDEV_FEATURE_PRINT__: options.mode === "export" || options.mode === "build" && [true, "true", "auto"].includes(options.data.config.download),
|
|
2674
|
+
__SLIDEV_FEATURE_BROWSER_EXPORTER__: matchMode(options.data.config.browserExporter),
|
|
2675
|
+
__SLIDEV_FEATURE_WAKE_LOCK__: matchMode(options.data.config.wakeLock),
|
|
2676
|
+
__SLIDEV_HAS_SERVER__: options.mode !== "build"
|
|
2677
|
+
},
|
|
2678
|
+
(v, k) => [v, JSON.stringify(k)]
|
|
2679
|
+
);
|
|
2675
2680
|
}
|
|
2676
2681
|
|
|
2677
2682
|
export {
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KGMP7MAV.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-CWAM2DSK.js";
|
|
13
13
|
import {
|
|
14
14
|
getRoots,
|
|
15
15
|
isInstalledGlobally,
|
|
@@ -26,7 +26,7 @@ import { verifyConfig } from "@slidev/parser";
|
|
|
26
26
|
import equal from "fast-deep-equal";
|
|
27
27
|
import fs from "fs-extra";
|
|
28
28
|
import { getPort } from "get-port-please";
|
|
29
|
-
import { blue, bold, cyan, dim, gray, green, underline, yellow } from "kolorist";
|
|
29
|
+
import { blue, bold, cyan, dim, gray, green, lightCyan, underline, yellow } from "kolorist";
|
|
30
30
|
import openBrowser from "open";
|
|
31
31
|
import yargs from "yargs";
|
|
32
32
|
|
|
@@ -299,6 +299,8 @@ ${dim(" Public IP: ")} ${blue(publicIp)}
|
|
|
299
299
|
restartServer();
|
|
300
300
|
});
|
|
301
301
|
watcher.on("change", (file) => {
|
|
302
|
+
if (typeof file !== "string")
|
|
303
|
+
return;
|
|
302
304
|
if (FILES_CREATE_RESTART.includes(file))
|
|
303
305
|
return;
|
|
304
306
|
console.log(yellow(`
|
|
@@ -330,7 +332,7 @@ cli.command(
|
|
|
330
332
|
}).strict().help(),
|
|
331
333
|
async (args) => {
|
|
332
334
|
const { entry, theme, base, download, out, inspect } = args;
|
|
333
|
-
const { build } = await import("./build-
|
|
335
|
+
const { build } = await import("./build-P4Y7476T.js");
|
|
334
336
|
for (const entryFile of entry) {
|
|
335
337
|
const options = await resolveOptions({ entry: entryFile, theme, inspect, download }, "build");
|
|
336
338
|
printInfo(options);
|
|
@@ -410,8 +412,18 @@ cli.command(
|
|
|
410
412
|
const { entry, theme } = args;
|
|
411
413
|
const { exportSlides, getExportOptions } = await import("./export-I2C456L6.js");
|
|
412
414
|
const port = await getPort(12445);
|
|
415
|
+
let warned = false;
|
|
413
416
|
for (const entryFile of entry) {
|
|
414
417
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
418
|
+
if (options.data.config.browserExporter !== false && !warned) {
|
|
419
|
+
warned = true;
|
|
420
|
+
console.log(lightCyan("[Slidev] Try the new browser exporter!"));
|
|
421
|
+
console.log(
|
|
422
|
+
lightCyan("You can use the browser exporter instead by starting the dev server as normal and visit"),
|
|
423
|
+
`${blue("localhost:")}${dim("<port>")}${blue("/export")}
|
|
424
|
+
`
|
|
425
|
+
);
|
|
426
|
+
}
|
|
415
427
|
const server = await createServer(
|
|
416
428
|
options,
|
|
417
429
|
{
|
|
@@ -559,8 +571,11 @@ function printInfo(options, port, remote, tunnelUrl, publicIp) {
|
|
|
559
571
|
console.log(`${dim(" public slide show ")} > ${cyan(`http://localhost:${bold(port)}/`)}`);
|
|
560
572
|
if (query)
|
|
561
573
|
console.log(`${dim(" private slide show ")} > ${cyan(`http://localhost:${bold(port)}/${query}`)}`);
|
|
562
|
-
|
|
574
|
+
if (options.utils.define.__SLIDEV_FEATURE_PRESENTER__)
|
|
575
|
+
console.log(`${dim(" presenter mode ")} > ${blue(`http://localhost:${bold(port)}${presenterPath}`)}`);
|
|
563
576
|
console.log(`${dim(" slides overview ")} > ${blue(`http://localhost:${bold(port)}${overviewPath}`)}`);
|
|
577
|
+
if (options.utils.define.__SLIDEV_FEATURE_BROWSER_EXPORTER__)
|
|
578
|
+
console.log(`${dim(" export slides")} > ${blue(`http://localhost:${bold(port)}/export/`)}`);
|
|
564
579
|
if (options.inspect)
|
|
565
580
|
console.log(`${dim(" vite inspector")} > ${yellow(`http://localhost:${bold(port)}/__inspect/`)}`);
|
|
566
581
|
let lastRemoteUrl = "";
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KGMP7MAV.js";
|
|
4
4
|
import {
|
|
5
5
|
ViteSlidevPlugin,
|
|
6
6
|
createDataUtils,
|
|
7
7
|
parser,
|
|
8
8
|
resolveOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CWAM2DSK.js";
|
|
10
10
|
import "./chunk-UNQ5DBLZ.js";
|
|
11
11
|
export {
|
|
12
12
|
ViteSlidevPlugin,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.51.0-beta.1",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,36 +42,36 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@antfu/ni": "^0.23.
|
|
45
|
+
"@antfu/ni": "^0.23.2",
|
|
46
46
|
"@antfu/utils": "^0.7.10",
|
|
47
|
-
"@iconify-json/carbon": "^1.2.
|
|
48
|
-
"@iconify-json/ph": "^1.2.
|
|
49
|
-
"@iconify-json/svg-spinners": "^1.2.
|
|
47
|
+
"@iconify-json/carbon": "^1.2.5",
|
|
48
|
+
"@iconify-json/ph": "^1.2.2",
|
|
49
|
+
"@iconify-json/svg-spinners": "^1.2.2",
|
|
50
50
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
51
|
-
"@shikijs/markdown-it": "^1.24.
|
|
52
|
-
"@shikijs/twoslash": "^1.24.
|
|
53
|
-
"@shikijs/vitepress-twoslash": "^1.24.
|
|
54
|
-
"@unocss/extractor-mdc": "^0.65.
|
|
55
|
-
"@unocss/reset": "^0.65.
|
|
51
|
+
"@shikijs/markdown-it": "^1.24.4",
|
|
52
|
+
"@shikijs/twoslash": "^1.24.4",
|
|
53
|
+
"@shikijs/vitepress-twoslash": "^1.24.4",
|
|
54
|
+
"@unocss/extractor-mdc": "^0.65.3",
|
|
55
|
+
"@unocss/reset": "^0.65.3",
|
|
56
56
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
57
57
|
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
58
|
-
"chokidar": "^4.0.
|
|
58
|
+
"chokidar": "^4.0.3",
|
|
59
59
|
"cli-progress": "^3.12.0",
|
|
60
60
|
"connect": "^3.7.0",
|
|
61
|
-
"debug": "^4.
|
|
61
|
+
"debug": "^4.4.0",
|
|
62
62
|
"fast-deep-equal": "^3.1.3",
|
|
63
63
|
"fast-glob": "^3.3.2",
|
|
64
64
|
"fs-extra": "^11.2.0",
|
|
65
65
|
"get-port-please": "^3.1.2",
|
|
66
66
|
"global-directory": "^4.0.1",
|
|
67
|
-
"htmlparser2": "^
|
|
67
|
+
"htmlparser2": "^10.0.0",
|
|
68
68
|
"is-installed-globally": "^1.0.0",
|
|
69
|
-
"jiti": "^2.4.
|
|
70
|
-
"katex": "^0.16.
|
|
69
|
+
"jiti": "^2.4.2",
|
|
70
|
+
"katex": "^0.16.18",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
72
|
"local-pkg": "^0.5.1",
|
|
73
73
|
"lz-string": "^1.5.0",
|
|
74
|
-
"magic-string": "^0.30.
|
|
74
|
+
"magic-string": "^0.30.17",
|
|
75
75
|
"magic-string-stack": "^0.1.1",
|
|
76
76
|
"markdown-it": "^14.1.0",
|
|
77
77
|
"markdown-it-footnote": "^4.0.0",
|
|
@@ -89,19 +89,19 @@
|
|
|
89
89
|
"resolve-from": "^5.0.0",
|
|
90
90
|
"resolve-global": "^2.0.0",
|
|
91
91
|
"semver": "^7.6.3",
|
|
92
|
-
"shiki": "^1.24.
|
|
93
|
-
"shiki-magic-move": "^0.5.
|
|
92
|
+
"shiki": "^1.24.4",
|
|
93
|
+
"shiki-magic-move": "^0.5.2",
|
|
94
94
|
"sirv": "^3.0.0",
|
|
95
95
|
"source-map-js": "^1.2.1",
|
|
96
96
|
"typescript": "5.6.3",
|
|
97
|
-
"unocss": "^0.65.
|
|
98
|
-
"unplugin-icons": "^0.
|
|
99
|
-
"unplugin-vue-components": "^0.
|
|
100
|
-
"unplugin-vue-markdown": "^0.
|
|
97
|
+
"unocss": "^0.65.3",
|
|
98
|
+
"unplugin-icons": "^0.22.0",
|
|
99
|
+
"unplugin-vue-components": "^0.28.0",
|
|
100
|
+
"unplugin-vue-markdown": "^0.28.0",
|
|
101
101
|
"untun": "^0.1.3",
|
|
102
102
|
"uqr": "^0.1.2",
|
|
103
|
-
"vite": "^6.0.
|
|
104
|
-
"vite-plugin-inspect": "^0.10.
|
|
103
|
+
"vite": "^6.0.6",
|
|
104
|
+
"vite-plugin-inspect": "^0.10.6",
|
|
105
105
|
"vite-plugin-remote-assets": "^0.6.0",
|
|
106
106
|
"vite-plugin-static-copy": "^2.2.0",
|
|
107
107
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"vue": "^3.5.13",
|
|
110
110
|
"yaml": "^2.6.1",
|
|
111
111
|
"yargs": "^17.7.2",
|
|
112
|
-
"@slidev/
|
|
113
|
-
"@slidev/
|
|
114
|
-
"@slidev/
|
|
112
|
+
"@slidev/client": "0.51.0-beta.1",
|
|
113
|
+
"@slidev/parser": "0.51.0-beta.1",
|
|
114
|
+
"@slidev/types": "0.51.0-beta.1"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|