@slidev/cli 0.47.3 → 0.47.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-RGXER2G4.mjs → build-PWXIW7LX.mjs} +3 -3
- package/dist/{chunk-O6VUSZMJ.mjs → chunk-DWXI5WEO.mjs} +3 -3
- package/dist/{chunk-DAZBDXA7.mjs → chunk-WP4GJCFS.mjs} +1 -1
- package/dist/{chunk-YJTIXRZE.mjs → chunk-YMFFALJD.mjs} +3 -3
- package/dist/cli.mjs +9 -6
- package/dist/{export-DBOVADXI.mjs → export-MLH55TH5.mjs} +8 -5
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WP4GJCFS.mjs";
|
|
6
6
|
import "./chunk-CTBVOVLQ.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-DWXI5WEO.mjs";
|
|
8
8
|
import "./chunk-BXO7ZPPU.mjs";
|
|
9
9
|
|
|
10
10
|
// node/build.ts
|
|
@@ -98,7 +98,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
98
98
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
99
99
|
`, "utf-8");
|
|
100
100
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
101
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
101
|
+
const { exportSlides, getExportOptions } = await import("./export-MLH55TH5.mjs");
|
|
102
102
|
const port = 12445;
|
|
103
103
|
const app = connect();
|
|
104
104
|
const server = http.createServer(app);
|
|
@@ -12,7 +12,7 @@ function toAtFS(path) {
|
|
|
12
12
|
}
|
|
13
13
|
async function resolveImportPath(importName, ensure = false) {
|
|
14
14
|
try {
|
|
15
|
-
return resolvePath(importName, {
|
|
15
|
+
return await resolvePath(importName, {
|
|
16
16
|
url: fileURLToPath(import.meta.url)
|
|
17
17
|
});
|
|
18
18
|
} catch {
|
|
@@ -33,7 +33,7 @@ async function resolveImportPath(importName, ensure = false) {
|
|
|
33
33
|
}
|
|
34
34
|
async function resolveGlobalImportPath(importName) {
|
|
35
35
|
try {
|
|
36
|
-
return resolvePath(importName, {
|
|
36
|
+
return await resolvePath(importName, {
|
|
37
37
|
url: fileURLToPath(import.meta.url)
|
|
38
38
|
});
|
|
39
39
|
} catch {
|
|
@@ -57,7 +57,7 @@ function generateGoogleFontsUrl(options) {
|
|
|
57
57
|
return `https://fonts.googleapis.com/css2?${fonts}&display=swap`;
|
|
58
58
|
}
|
|
59
59
|
async function packageExists(name) {
|
|
60
|
-
if (await resolveImportPath(`${name}/package.json`))
|
|
60
|
+
if (await resolveImportPath(`${name}/package.json`).catch(() => false))
|
|
61
61
|
return true;
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WP4GJCFS.mjs";
|
|
5
5
|
import {
|
|
6
6
|
packageExists,
|
|
7
7
|
resolveImportPath
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DWXI5WEO.mjs";
|
|
9
9
|
import {
|
|
10
10
|
__commonJS,
|
|
11
11
|
__toESM
|
|
@@ -2523,7 +2523,7 @@ async function createServer(options2, viteConfig = {}, serverOptions = {}) {
|
|
|
2523
2523
|
import * as parser from "@slidev/parser/fs";
|
|
2524
2524
|
|
|
2525
2525
|
// package.json
|
|
2526
|
-
var version = "0.47.
|
|
2526
|
+
var version = "0.47.4";
|
|
2527
2527
|
|
|
2528
2528
|
// node/themes.ts
|
|
2529
2529
|
import prompts2 from "prompts";
|
package/dist/cli.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveThemeName,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-YMFFALJD.mjs";
|
|
13
|
+
import "./chunk-WP4GJCFS.mjs";
|
|
14
14
|
import {
|
|
15
15
|
loadSetups
|
|
16
16
|
} from "./chunk-CTBVOVLQ.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-DWXI5WEO.mjs";
|
|
18
18
|
import "./chunk-BXO7ZPPU.mjs";
|
|
19
19
|
|
|
20
20
|
// node/cli.ts
|
|
@@ -269,7 +269,7 @@ cli.command(
|
|
|
269
269
|
}).strict().help(),
|
|
270
270
|
async (args) => {
|
|
271
271
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
272
|
-
const { build } = await import("./build-
|
|
272
|
+
const { build } = await import("./build-PWXIW7LX.mjs");
|
|
273
273
|
for (const entryFile of entry) {
|
|
274
274
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
275
275
|
if (download && !options.data.config.download)
|
|
@@ -348,7 +348,7 @@ cli.command(
|
|
|
348
348
|
async (args) => {
|
|
349
349
|
const { entry, theme } = args;
|
|
350
350
|
process.env.NODE_ENV = "production";
|
|
351
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
351
|
+
const { exportSlides, getExportOptions } = await import("./export-MLH55TH5.mjs");
|
|
352
352
|
const port = await findFreePort(12445);
|
|
353
353
|
for (const entryFile of entry) {
|
|
354
354
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
@@ -394,7 +394,7 @@ cli.command(
|
|
|
394
394
|
timeout
|
|
395
395
|
}) => {
|
|
396
396
|
process.env.NODE_ENV = "production";
|
|
397
|
-
const { exportNotes } = await import("./export-
|
|
397
|
+
const { exportNotes } = await import("./export-MLH55TH5.mjs");
|
|
398
398
|
const port = await findFreePort(12445);
|
|
399
399
|
for (const entryFile of entry) {
|
|
400
400
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
|
@@ -462,6 +462,9 @@ function exportOptions(args) {
|
|
|
462
462
|
}).option("per-slide", {
|
|
463
463
|
type: "boolean",
|
|
464
464
|
describe: "slide slides slide by slide. Works better with global components, but will break cross slide links and TOC in PDF"
|
|
465
|
+
}).option("scale", {
|
|
466
|
+
type: "number",
|
|
467
|
+
describe: "scale factor for image export"
|
|
465
468
|
});
|
|
466
469
|
}
|
|
467
470
|
function printInfo(options, port, remote, tunnelUrl, publicIp) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
packageExists,
|
|
3
3
|
resolveGlobalImportPath
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DWXI5WEO.mjs";
|
|
5
5
|
import "./chunk-BXO7ZPPU.mjs";
|
|
6
6
|
|
|
7
7
|
// node/export.ts
|
|
@@ -118,7 +118,8 @@ async function exportSlides({
|
|
|
118
118
|
withClicks = false,
|
|
119
119
|
executablePath = void 0,
|
|
120
120
|
withToc = false,
|
|
121
|
-
perSlide = false
|
|
121
|
+
perSlide = false,
|
|
122
|
+
scale = 1
|
|
122
123
|
}) {
|
|
123
124
|
const pages = parseRangeString(total, range);
|
|
124
125
|
const { chromium } = await importPlaywright();
|
|
@@ -131,7 +132,7 @@ async function exportSlides({
|
|
|
131
132
|
// Calculate height for every slides to be in the viewport to trigger the rendering of iframes (twitter, youtube...)
|
|
132
133
|
height: perSlide ? height : height * pages.length
|
|
133
134
|
},
|
|
134
|
-
deviceScaleFactor:
|
|
135
|
+
deviceScaleFactor: scale
|
|
135
136
|
});
|
|
136
137
|
const page = await context.newPage();
|
|
137
138
|
const progress = createSlidevProgress(!perSlide);
|
|
@@ -358,7 +359,8 @@ function getExportOptions(args, options, outDir, outFilename) {
|
|
|
358
359
|
withClicks,
|
|
359
360
|
executablePath,
|
|
360
361
|
withToc,
|
|
361
|
-
perSlide
|
|
362
|
+
perSlide,
|
|
363
|
+
scale
|
|
362
364
|
} = config;
|
|
363
365
|
outFilename = output || options.data.config.exportFilename || outFilename || `${path.basename(entry, ".md")}-export`;
|
|
364
366
|
if (outDir)
|
|
@@ -377,7 +379,8 @@ function getExportOptions(args, options, outDir, outFilename) {
|
|
|
377
379
|
withClicks: withClicks || false,
|
|
378
380
|
executablePath,
|
|
379
381
|
withToc: withToc || false,
|
|
380
|
-
perSlide: perSlide || false
|
|
382
|
+
perSlide: perSlide || false,
|
|
383
|
+
scale: scale || 1
|
|
381
384
|
};
|
|
382
385
|
}
|
|
383
386
|
async function importPlaywright() {
|
package/dist/index.mjs
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
isPath,
|
|
10
10
|
parser,
|
|
11
11
|
resolveOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YMFFALJD.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ViteSlidevPlugin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WP4GJCFS.mjs";
|
|
16
16
|
import "./chunk-CTBVOVLQ.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-DWXI5WEO.mjs";
|
|
18
18
|
import "./chunk-BXO7ZPPU.mjs";
|
|
19
19
|
export {
|
|
20
20
|
ViteSlidevPlugin,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.4",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"vitefu": "^0.2.5",
|
|
105
105
|
"vue": "^3.4.15",
|
|
106
106
|
"yargs": "^17.7.2",
|
|
107
|
-
"@slidev/
|
|
108
|
-
"@slidev/types": "0.47.
|
|
109
|
-
"@slidev/
|
|
107
|
+
"@slidev/client": "0.47.4",
|
|
108
|
+
"@slidev/types": "0.47.4",
|
|
109
|
+
"@slidev/parser": "0.47.4"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|