@slidev/cli 0.48.2 → 0.48.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/dist/{build-CZRPUF5Y.mjs → build-6DZCUTHS.mjs} +2 -2
- package/dist/{chunk-644IOZGH.mjs → chunk-M3AHQMLP.mjs} +6 -5
- package/dist/{chunk-WEMFFV42.mjs → chunk-MMPK7EAS.mjs} +4 -4
- package/dist/cli.mjs +16 -12
- package/dist/{export-P7ZNLPWH.mjs → export-7BCUWALW.mjs} +7 -4
- package/dist/index.mjs +2 -2
- package/package.json +7 -7
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M3AHQMLP.mjs";
|
|
6
6
|
import "./chunk-LOUKLO2C.mjs";
|
|
7
7
|
import "./chunk-AQQIBD5X.mjs";
|
|
8
8
|
|
|
@@ -62,7 +62,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
62
62
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
63
63
|
`, "utf-8");
|
|
64
64
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
65
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
65
|
+
const { exportSlides, getExportOptions } = await import("./export-7BCUWALW.mjs");
|
|
66
66
|
const port = 12445;
|
|
67
67
|
const app = connect();
|
|
68
68
|
const server = http.createServer(app);
|
|
@@ -146,7 +146,7 @@ var dependencies = {
|
|
|
146
146
|
"@slidev/rough-notation": "^0.1.0",
|
|
147
147
|
"@slidev/types": "workspace:*",
|
|
148
148
|
"@typescript/ata": "^0.9.4",
|
|
149
|
-
"@unhead/vue": "^1.8.
|
|
149
|
+
"@unhead/vue": "^1.8.18",
|
|
150
150
|
"@unocss/reset": "^0.58.5",
|
|
151
151
|
"@vueuse/core": "^10.9.0",
|
|
152
152
|
"@vueuse/math": "^10.9.0",
|
|
@@ -160,7 +160,7 @@ var dependencies = {
|
|
|
160
160
|
katex: "^0.16.9",
|
|
161
161
|
"lz-string": "^1.5.0",
|
|
162
162
|
mermaid: "^10.9.0",
|
|
163
|
-
"monaco-editor": "^0.
|
|
163
|
+
"monaco-editor": "^0.47.0",
|
|
164
164
|
prettier: "^3.2.5",
|
|
165
165
|
recordrtc: "^5.6.2",
|
|
166
166
|
shiki: "^1.1.7",
|
|
@@ -1243,7 +1243,7 @@ ${code}`;
|
|
|
1243
1243
|
|
|
1244
1244
|
// node/vite/markdown.ts
|
|
1245
1245
|
import Markdown2 from "unplugin-vue-markdown/vite";
|
|
1246
|
-
import { slash } from "@antfu/utils";
|
|
1246
|
+
import { isTruthy as isTruthy3, slash } from "@antfu/utils";
|
|
1247
1247
|
|
|
1248
1248
|
// ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=tuyuxytl56b2vxulpkzt2wf4o4_markdown-it@14.0.0/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
|
|
1249
1249
|
var SpecialCharacters;
|
|
@@ -1893,9 +1893,10 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
|
1893
1893
|
langs: options2.langs ?? Object.keys(bundledLanguages),
|
|
1894
1894
|
themes: "themes" in options2 ? Object.values(options2.themes) : [options2.theme]
|
|
1895
1895
|
});
|
|
1896
|
+
const twoslashEnabled = config.twoslash === true || config.twoslash === mode;
|
|
1896
1897
|
const transformers = [
|
|
1897
1898
|
...options2.transformers || [],
|
|
1898
|
-
transformerTwoslash({
|
|
1899
|
+
twoslashEnabled && transformerTwoslash({
|
|
1899
1900
|
explicitTrigger: true,
|
|
1900
1901
|
twoslashOptions: {
|
|
1901
1902
|
handbookOptions: {
|
|
@@ -1912,7 +1913,7 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
|
1912
1913
|
return escapeVueInCode(code);
|
|
1913
1914
|
}
|
|
1914
1915
|
}
|
|
1915
|
-
];
|
|
1916
|
+
].filter(isTruthy3);
|
|
1916
1917
|
const plugin = markdownItShiki(shiki, {
|
|
1917
1918
|
...options2,
|
|
1918
1919
|
transformers
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-M3AHQMLP.mjs";
|
|
5
5
|
import {
|
|
6
6
|
createResolver,
|
|
7
7
|
getRoots,
|
|
@@ -48,7 +48,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
48
48
|
import * as parser from "@slidev/parser/fs";
|
|
49
49
|
|
|
50
50
|
// package.json
|
|
51
|
-
var version = "0.48.
|
|
51
|
+
var version = "0.48.4";
|
|
52
52
|
|
|
53
53
|
// node/integrations/themes.ts
|
|
54
54
|
import { join as join2 } from "node:path";
|
|
@@ -86,10 +86,10 @@ async function resolveAddons(addonsInConfig) {
|
|
|
86
86
|
if (!pkgRoot)
|
|
87
87
|
return;
|
|
88
88
|
resolved.push(pkgRoot);
|
|
89
|
-
const { slidev, engines } = await fs2.readJSON(resolve(pkgRoot, "package.json"));
|
|
89
|
+
const { slidev = {}, engines = {} } = await fs2.readJSON(resolve(pkgRoot, "package.json"));
|
|
90
90
|
if (engines.slidev && !satisfies2(version, engines.slidev, { includePrerelease: true }))
|
|
91
91
|
throw new Error(`[slidev] addon "${name}" requires Slidev version range "${engines.slidev}" but found "${version}"`);
|
|
92
|
-
if (Array.isArray(slidev
|
|
92
|
+
if (Array.isArray(slidev.addons))
|
|
93
93
|
await Promise.all(slidev.addons.map((addon) => resolveAddon(addon, pkgRoot)));
|
|
94
94
|
}
|
|
95
95
|
if (Array.isArray(addonsInConfig))
|
package/dist/cli.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
resolveOptions,
|
|
7
7
|
resolveTheme,
|
|
8
8
|
version
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-MMPK7EAS.mjs";
|
|
10
|
+
import "./chunk-M3AHQMLP.mjs";
|
|
11
11
|
import {
|
|
12
12
|
loadSetups
|
|
13
13
|
} from "./chunk-LOUKLO2C.mjs";
|
|
@@ -325,19 +325,23 @@ cli.command(
|
|
|
325
325
|
}).strict().help(),
|
|
326
326
|
async (args) => {
|
|
327
327
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
328
|
-
const { build } = await import("./build-
|
|
328
|
+
const { build } = await import("./build-6DZCUTHS.mjs");
|
|
329
329
|
for (const entryFile of entry) {
|
|
330
330
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
331
331
|
if (download && !options.data.config.download)
|
|
332
332
|
options.data.config.download = download;
|
|
333
333
|
printInfo(options);
|
|
334
|
-
await build(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
await build(
|
|
335
|
+
options,
|
|
336
|
+
{
|
|
337
|
+
base,
|
|
338
|
+
build: {
|
|
339
|
+
watch: watch ? {} : void 0,
|
|
340
|
+
outDir: entry.length === 1 ? out : path.join(out, path.basename(entryFile, ".md"))
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{ ...args, entry: entryFile }
|
|
344
|
+
);
|
|
341
345
|
}
|
|
342
346
|
}
|
|
343
347
|
);
|
|
@@ -402,7 +406,7 @@ cli.command(
|
|
|
402
406
|
(args) => exportOptions(commonOptions(args)).strict().help(),
|
|
403
407
|
async (args) => {
|
|
404
408
|
const { entry, theme } = args;
|
|
405
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
409
|
+
const { exportSlides, getExportOptions } = await import("./export-7BCUWALW.mjs");
|
|
406
410
|
const port = await getPort(12445);
|
|
407
411
|
for (const entryFile of entry) {
|
|
408
412
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
@@ -446,7 +450,7 @@ cli.command(
|
|
|
446
450
|
output,
|
|
447
451
|
timeout
|
|
448
452
|
}) => {
|
|
449
|
-
const { exportNotes } = await import("./export-
|
|
453
|
+
const { exportNotes } = await import("./export-7BCUWALW.mjs");
|
|
450
454
|
const port = await getPort(12445);
|
|
451
455
|
for (const entryFile of entry) {
|
|
452
456
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
|
@@ -8,6 +8,7 @@ import { Buffer } from "node:buffer";
|
|
|
8
8
|
import fs from "fs-extra";
|
|
9
9
|
import { blue, cyan, dim, green, yellow } from "kolorist";
|
|
10
10
|
import { Presets, SingleBar } from "cli-progress";
|
|
11
|
+
import { clearUndefined } from "@antfu/utils";
|
|
11
12
|
import { parseRangeString } from "@slidev/parser/core";
|
|
12
13
|
import { outlinePdfFactory } from "@lillallol/outline-pdf";
|
|
13
14
|
import * as pdfLib from "pdf-lib";
|
|
@@ -371,10 +372,12 @@ function getExportOptions(args, options, outDir, outFilename) {
|
|
|
371
372
|
const config = {
|
|
372
373
|
...options.data.config.export,
|
|
373
374
|
...args,
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
...clearUndefined({
|
|
376
|
+
withClicks: args["with-clicks"],
|
|
377
|
+
executablePath: args["executable-path"],
|
|
378
|
+
withToc: args["with-toc"],
|
|
379
|
+
perSlide: args["per-slide"]
|
|
380
|
+
})
|
|
378
381
|
};
|
|
379
382
|
const {
|
|
380
383
|
entry,
|
package/dist/index.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createServer,
|
|
3
3
|
parser,
|
|
4
4
|
resolveOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MMPK7EAS.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ViteSlidevPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-M3AHQMLP.mjs";
|
|
9
9
|
import "./chunk-LOUKLO2C.mjs";
|
|
10
10
|
import "./chunk-AQQIBD5X.mjs";
|
|
11
11
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.4",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"markdown-it-link-attributes": "^4.0.1",
|
|
78
78
|
"markdown-it-mdc": "^0.2.3",
|
|
79
79
|
"mlly": "^1.6.1",
|
|
80
|
-
"monaco-editor": "^0.
|
|
81
|
-
"open": "^10.0
|
|
80
|
+
"monaco-editor": "^0.47.0",
|
|
81
|
+
"open": "^10.1.0",
|
|
82
82
|
"pdf-lib": "^1.17.1",
|
|
83
83
|
"plantuml-encoder": "^1.4.0",
|
|
84
84
|
"postcss-nested": "^6.0.1",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"unplugin-vue-markdown": "^0.26.0",
|
|
99
99
|
"untun": "^0.1.3",
|
|
100
100
|
"uqr": "^0.1.2",
|
|
101
|
-
"vite": "^5.1.
|
|
101
|
+
"vite": "^5.1.6",
|
|
102
102
|
"vite-plugin-inspect": "^0.8.3",
|
|
103
103
|
"vite-plugin-remote-assets": "^0.4.1",
|
|
104
104
|
"vite-plugin-static-copy": "^1.0.1",
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"vitefu": "^0.2.5",
|
|
107
107
|
"vue": "^3.4.21",
|
|
108
108
|
"yargs": "^17.7.2",
|
|
109
|
-
"@slidev/
|
|
110
|
-
"@slidev/
|
|
111
|
-
"@slidev/
|
|
109
|
+
"@slidev/client": "0.48.4",
|
|
110
|
+
"@slidev/types": "0.48.4",
|
|
111
|
+
"@slidev/parser": "0.48.4"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|