@slidev/cli 0.34.1 → 0.34.2
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-AZXVYLTZ.mjs → build-F5QDKRVS.mjs} +1 -1
- package/dist/{build-ONMHHPBT.js → build-ZRCGLMWG.js} +5 -5
- package/dist/{chunk-VO7LIZVO.mjs → chunk-4BYU5VF4.mjs} +2 -2
- package/dist/{chunk-BQ63PXSA.mjs → chunk-4NHF5SPM.mjs} +11 -10
- package/dist/{chunk-PNKOKFFZ.js → chunk-EN47OEVJ.js} +4 -4
- package/dist/{chunk-FD6XUAB4.js → chunk-XIB52LE6.js} +11 -10
- package/dist/cli.js +21 -21
- package/dist/cli.mjs +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkXIB52LE6js = require('./chunk-XIB52LE6.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -655,13 +655,13 @@ async function build(options, viteConfig = {}) {
|
|
|
655
655
|
let originalIndexHTML;
|
|
656
656
|
if (_fsextra2.default.existsSync(indexPath))
|
|
657
657
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
658
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
658
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkXIB52LE6js.getIndexHtml.call(void 0, options), "utf-8");
|
|
659
659
|
let config = void 0;
|
|
660
660
|
try {
|
|
661
|
-
const inlineConfig = await
|
|
661
|
+
const inlineConfig = await _chunkXIB52LE6js.mergeViteConfigs.call(void 0, options, viteConfig, {
|
|
662
662
|
root: options.userRoot,
|
|
663
663
|
plugins: [
|
|
664
|
-
await
|
|
664
|
+
await _chunkXIB52LE6js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
665
665
|
{
|
|
666
666
|
name: "resolve-config",
|
|
667
667
|
configResolved(_config) {
|
|
@@ -679,7 +679,7 @@ async function build(options, viteConfig = {}) {
|
|
|
679
679
|
console.log(_kolorist.yellow.call(void 0, " Monaco is disabled in the build, to enabled it, set `monaco: true` in the frontmatter"));
|
|
680
680
|
} else {
|
|
681
681
|
console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
|
|
682
|
-
await _vite.build.call(void 0, await
|
|
682
|
+
await _vite.build.call(void 0, await _chunkXIB52LE6js.mergeViteConfigs.call(void 0, options, inlineConfig, {
|
|
683
683
|
root: _path.join.call(void 0, options.clientRoot, "iframes/monaco"),
|
|
684
684
|
base: `${config.base}iframes/monaco/`,
|
|
685
685
|
build: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4NHF5SPM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__dirname,
|
|
@@ -2399,7 +2399,7 @@ init_esm_shims();
|
|
|
2399
2399
|
import * as parser from "@slidev/parser/fs";
|
|
2400
2400
|
|
|
2401
2401
|
// package.json
|
|
2402
|
-
var version = "0.34.
|
|
2402
|
+
var version = "0.34.2";
|
|
2403
2403
|
|
|
2404
2404
|
// node/themes.ts
|
|
2405
2405
|
init_esm_shims();
|
|
@@ -201,6 +201,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
201
201
|
|
|
202
202
|
// node/plugins/preset.ts
|
|
203
203
|
init_esm_shims();
|
|
204
|
+
import { join as join8 } from "path";
|
|
204
205
|
import Vue from "@vitejs/plugin-vue";
|
|
205
206
|
import Icons from "unplugin-icons/vite";
|
|
206
207
|
import IconsResolver from "unplugin-icons/resolver";
|
|
@@ -1275,11 +1276,11 @@ var MarkdownItShiki = (markdownit, options = {}) => {
|
|
|
1275
1276
|
markdownit.options.highlight = (code, lang) => {
|
|
1276
1277
|
if (darkModeThemes) {
|
|
1277
1278
|
const trimmed = trimEndNewLine(code);
|
|
1278
|
-
const dark = _highlighter.codeToHtml(trimmed, lang || "text", darkModeThemes.dark).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-dark"');
|
|
1279
|
-
const light = _highlighter.codeToHtml(trimmed, lang || "text", darkModeThemes.light).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-light"');
|
|
1279
|
+
const dark = _highlighter.codeToHtml(trimmed, { lang: lang || "text", theme: darkModeThemes.dark }).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-dark"');
|
|
1280
|
+
const light = _highlighter.codeToHtml(trimmed, { lang: lang || "text", theme: darkModeThemes.light }).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-light"');
|
|
1280
1281
|
return escapeVueInCode(`<pre class="shiki-container">${dark}${light}</pre>`);
|
|
1281
1282
|
} else {
|
|
1282
|
-
return escapeVueInCode(_highlighter.codeToHtml(code, lang || "text").replace('<pre class="shiki"', '<pre class="slidev-code shiki"'));
|
|
1283
|
+
return escapeVueInCode(_highlighter.codeToHtml(code, { lang: lang || "text" }).replace('<pre class="shiki"', '<pre class="slidev-code shiki"'));
|
|
1283
1284
|
}
|
|
1284
1285
|
};
|
|
1285
1286
|
};
|
|
@@ -1377,18 +1378,18 @@ function transformSlotSugar(md2) {
|
|
|
1377
1378
|
return lines.join("\n");
|
|
1378
1379
|
}
|
|
1379
1380
|
function transformHighlighter(md2) {
|
|
1380
|
-
return md2.replace(/^```(\w+?)
|
|
1381
|
+
return md2.replace(/^```(\w+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?\s*?)?\n([\s\S]+?)^```/mg, (full, lang = "", rangeStr = "", options = "", code) => {
|
|
1381
1382
|
const ranges = rangeStr.split(/\|/g).map((i) => i.trim());
|
|
1382
1383
|
code = code.trimEnd();
|
|
1383
1384
|
options = options.trim() || "{}";
|
|
1384
1385
|
return `
|
|
1385
|
-
<
|
|
1386
|
+
<CodeBlockWrapper v-bind="${options}" :ranges='${JSON.stringify(ranges)}'>
|
|
1386
1387
|
|
|
1387
1388
|
\`\`\`${lang}
|
|
1388
1389
|
${code}
|
|
1389
1390
|
\`\`\`
|
|
1390
1391
|
|
|
1391
|
-
</
|
|
1392
|
+
</CodeBlockWrapper>`;
|
|
1392
1393
|
});
|
|
1393
1394
|
}
|
|
1394
1395
|
function getCodeBlocks(md2) {
|
|
@@ -1564,10 +1565,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1564
1565
|
Components({
|
|
1565
1566
|
extensions: ["vue", "md", "ts"],
|
|
1566
1567
|
dirs: [
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
...themeRoots.map((i) =>
|
|
1570
|
-
...addonRoots.map((i) =>
|
|
1568
|
+
join8(clientRoot, "builtin"),
|
|
1569
|
+
join8(clientRoot, "components"),
|
|
1570
|
+
...themeRoots.map((i) => join8(i, "components")),
|
|
1571
|
+
...addonRoots.map((i) => join8(i, "components")),
|
|
1571
1572
|
"src/components",
|
|
1572
1573
|
"components"
|
|
1573
1574
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXIB52LE6js = require('./chunk-XIB52LE6.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -2380,14 +2380,14 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
2380
2380
|
const rawConfig = await _vite.resolveConfig.call(void 0, {}, "serve");
|
|
2381
2381
|
const pluginOptions = rawConfig.slidev || {};
|
|
2382
2382
|
process.env.EDITOR = process.env.EDITOR || "code";
|
|
2383
|
-
const server = await _vite.createServer.call(void 0, await
|
|
2383
|
+
const server = await _vite.createServer.call(void 0, await _chunkXIB52LE6js.mergeViteConfigs.call(void 0, options, viteConfig, {
|
|
2384
2384
|
optimizeDeps: {
|
|
2385
2385
|
entries: [
|
|
2386
2386
|
_path.join.call(void 0, options.clientRoot, "main.ts")
|
|
2387
2387
|
]
|
|
2388
2388
|
},
|
|
2389
2389
|
plugins: [
|
|
2390
|
-
await
|
|
2390
|
+
await _chunkXIB52LE6js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
2391
2391
|
]
|
|
2392
2392
|
}, "serve"));
|
|
2393
2393
|
return server;
|
|
@@ -2398,7 +2398,7 @@ _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
|
2398
2398
|
var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
|
|
2399
2399
|
|
|
2400
2400
|
// package.json
|
|
2401
|
-
var version = "0.34.
|
|
2401
|
+
var version = "0.34.2";
|
|
2402
2402
|
|
|
2403
2403
|
// node/themes.ts
|
|
2404
2404
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
@@ -200,6 +200,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
200
200
|
|
|
201
201
|
// node/plugins/preset.ts
|
|
202
202
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
203
|
+
|
|
203
204
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
204
205
|
var _vite3 = require('unplugin-icons/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
205
206
|
var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
|
|
@@ -1274,11 +1275,11 @@ var MarkdownItShiki = (markdownit, options = {}) => {
|
|
|
1274
1275
|
markdownit.options.highlight = (code, lang) => {
|
|
1275
1276
|
if (darkModeThemes) {
|
|
1276
1277
|
const trimmed = trimEndNewLine(code);
|
|
1277
|
-
const dark = _highlighter.codeToHtml(trimmed, lang || "text", darkModeThemes.dark).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-dark"');
|
|
1278
|
-
const light = _highlighter.codeToHtml(trimmed, lang || "text", darkModeThemes.light).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-light"');
|
|
1278
|
+
const dark = _highlighter.codeToHtml(trimmed, { lang: lang || "text", theme: darkModeThemes.dark }).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-dark"');
|
|
1279
|
+
const light = _highlighter.codeToHtml(trimmed, { lang: lang || "text", theme: darkModeThemes.light }).replace('<pre class="shiki"', '<pre class="slidev-code shiki shiki-light"');
|
|
1279
1280
|
return escapeVueInCode(`<pre class="shiki-container">${dark}${light}</pre>`);
|
|
1280
1281
|
} else {
|
|
1281
|
-
return escapeVueInCode(_highlighter.codeToHtml(code, lang || "text").replace('<pre class="shiki"', '<pre class="slidev-code shiki"'));
|
|
1282
|
+
return escapeVueInCode(_highlighter.codeToHtml(code, { lang: lang || "text" }).replace('<pre class="shiki"', '<pre class="slidev-code shiki"'));
|
|
1282
1283
|
}
|
|
1283
1284
|
};
|
|
1284
1285
|
};
|
|
@@ -1376,18 +1377,18 @@ function transformSlotSugar(md2) {
|
|
|
1376
1377
|
return lines.join("\n");
|
|
1377
1378
|
}
|
|
1378
1379
|
function transformHighlighter(md2) {
|
|
1379
|
-
return md2.replace(/^```(\w+?)
|
|
1380
|
+
return md2.replace(/^```(\w+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?\s*?)?\n([\s\S]+?)^```/mg, (full, lang = "", rangeStr = "", options = "", code) => {
|
|
1380
1381
|
const ranges = rangeStr.split(/\|/g).map((i) => i.trim());
|
|
1381
1382
|
code = code.trimEnd();
|
|
1382
1383
|
options = options.trim() || "{}";
|
|
1383
1384
|
return `
|
|
1384
|
-
<
|
|
1385
|
+
<CodeBlockWrapper v-bind="${options}" :ranges='${JSON.stringify(ranges)}'>
|
|
1385
1386
|
|
|
1386
1387
|
\`\`\`${lang}
|
|
1387
1388
|
${code}
|
|
1388
1389
|
\`\`\`
|
|
1389
1390
|
|
|
1390
|
-
</
|
|
1391
|
+
</CodeBlockWrapper>`;
|
|
1391
1392
|
});
|
|
1392
1393
|
}
|
|
1393
1394
|
function getCodeBlocks(md2) {
|
|
@@ -1563,10 +1564,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1563
1564
|
_vite6.default.call(void 0, {
|
|
1564
1565
|
extensions: ["vue", "md", "ts"],
|
|
1565
1566
|
dirs: [
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
...themeRoots.map((i) =>
|
|
1569
|
-
...addonRoots.map((i) =>
|
|
1567
|
+
_path.join.call(void 0, clientRoot, "builtin"),
|
|
1568
|
+
_path.join.call(void 0, clientRoot, "components"),
|
|
1569
|
+
...themeRoots.map((i) => _path.join.call(void 0, i, "components")),
|
|
1570
|
+
...addonRoots.map((i) => _path.join.call(void 0, i, "components")),
|
|
1570
1571
|
"src/components",
|
|
1571
1572
|
"components"
|
|
1572
1573
|
],
|
package/dist/cli.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkEN47OEVJjs = require('./chunk-EN47OEVJ.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXIB52LE6js = require('./chunk-XIB52LE6.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -18,7 +18,7 @@ var _chunkSQLX75IOjs = require('./chunk-SQLX75IO.js');
|
|
|
18
18
|
|
|
19
19
|
// node/cli.ts
|
|
20
20
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
21
|
-
var import_fast_deep_equal = _chunkSQLX75IOjs.__toESM.call(void 0,
|
|
21
|
+
var import_fast_deep_equal = _chunkSQLX75IOjs.__toESM.call(void 0, _chunkXIB52LE6js.require_fast_deep_equal.call(void 0, ));
|
|
22
22
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
23
23
|
var _net = require('net'); var _net2 = _interopRequireDefault(_net);
|
|
24
24
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
@@ -38,7 +38,7 @@ var CONFIG_RESTART_FIELDS = [
|
|
|
38
38
|
"fonts",
|
|
39
39
|
"css"
|
|
40
40
|
];
|
|
41
|
-
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(
|
|
41
|
+
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkEN47OEVJjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
|
|
42
42
|
cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
|
|
43
43
|
alias: "p",
|
|
44
44
|
type: "number",
|
|
@@ -81,9 +81,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
81
81
|
async function initServer() {
|
|
82
82
|
if (server)
|
|
83
83
|
await server.close();
|
|
84
|
-
const options = await
|
|
84
|
+
const options = await _chunkEN47OEVJjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
|
|
85
85
|
port = userPort || await findFreePort(3030);
|
|
86
|
-
server = await
|
|
86
|
+
server = await _chunkEN47OEVJjs.createServer.call(void 0, options, {
|
|
87
87
|
server: {
|
|
88
88
|
port,
|
|
89
89
|
strictPort: true,
|
|
@@ -94,7 +94,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
94
94
|
logLevel: log
|
|
95
95
|
}, {
|
|
96
96
|
onDataReload(newData, data) {
|
|
97
|
-
if (!theme &&
|
|
97
|
+
if (!theme && _chunkEN47OEVJjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkEN47OEVJjs.resolveThemeName.call(void 0, data.config.theme)) {
|
|
98
98
|
console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
|
|
99
99
|
initServer();
|
|
100
100
|
} else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
|
|
@@ -170,8 +170,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
170
170
|
type: "boolean",
|
|
171
171
|
describe: "allow download as PDF"
|
|
172
172
|
}).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
|
|
173
|
-
const { build } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./build-
|
|
174
|
-
const options = await
|
|
173
|
+
const { build } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./build-ZRCGLMWG.js")));
|
|
174
|
+
const options = await _chunkEN47OEVJjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
175
175
|
if (download && !options.data.config.download)
|
|
176
176
|
options.data.config.download = download;
|
|
177
177
|
printInfo(options);
|
|
@@ -184,26 +184,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
184
184
|
});
|
|
185
185
|
});
|
|
186
186
|
cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
|
|
187
|
-
const data = await
|
|
188
|
-
|
|
189
|
-
await
|
|
187
|
+
const data = await _chunkEN47OEVJjs.parser.load(entry);
|
|
188
|
+
_chunkEN47OEVJjs.parser.prettify(data);
|
|
189
|
+
await _chunkEN47OEVJjs.parser.save(data);
|
|
190
190
|
});
|
|
191
191
|
cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
192
192
|
return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
|
|
193
193
|
type: "string",
|
|
194
194
|
default: "theme"
|
|
195
195
|
}), async ({ entry, dir, theme: themeInput }) => {
|
|
196
|
-
const data = await
|
|
197
|
-
const theme =
|
|
196
|
+
const data = await _chunkEN47OEVJjs.parser.load(entry);
|
|
197
|
+
const theme = _chunkEN47OEVJjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
|
|
198
198
|
if (theme === "none") {
|
|
199
199
|
console.error('Can not eject theme "none"');
|
|
200
200
|
process.exit(1);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
202
|
+
if (_chunkEN47OEVJjs.isPath.call(void 0, theme)) {
|
|
203
203
|
console.error("Theme is already ejected");
|
|
204
204
|
process.exit(1);
|
|
205
205
|
}
|
|
206
|
-
const roots =
|
|
206
|
+
const roots = _chunkEN47OEVJjs.getThemeRoots.call(void 0, theme, entry);
|
|
207
207
|
if (!roots.length) {
|
|
208
208
|
console.error(`Does not found theme "${theme}"`);
|
|
209
209
|
process.exit(1);
|
|
@@ -215,7 +215,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
|
215
215
|
const dirPath = `./${dir}`;
|
|
216
216
|
data.slides[0].frontmatter.theme = dirPath;
|
|
217
217
|
data.slides[0].raw = null;
|
|
218
|
-
await
|
|
218
|
+
await _chunkEN47OEVJjs.parser.save(data);
|
|
219
219
|
console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
|
|
220
220
|
});
|
|
221
221
|
}, () => {
|
|
@@ -259,15 +259,15 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
|
|
|
259
259
|
process.env.NODE_ENV = "production";
|
|
260
260
|
const { exportSlides } = await Promise.resolve().then(() => _chunkSQLX75IOjs.__toESM.call(void 0, _chunkSQLX75IOjs.__require.call(void 0, "./export-TH7MNEXN.js")));
|
|
261
261
|
const port = await findFreePort(12445);
|
|
262
|
-
const options = await
|
|
262
|
+
const options = await _chunkEN47OEVJjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
263
263
|
output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
|
|
264
|
-
const server = await
|
|
264
|
+
const server = await _chunkEN47OEVJjs.createServer.call(void 0, options, {
|
|
265
265
|
server: { port },
|
|
266
266
|
clearScreen: false
|
|
267
267
|
});
|
|
268
268
|
await server.listen(port);
|
|
269
269
|
printInfo(options);
|
|
270
|
-
|
|
270
|
+
_chunkEN47OEVJjs.parser.filterDisabled(options.data);
|
|
271
271
|
const width = options.data.config.canvasWidth;
|
|
272
272
|
const height = Math.round(width / options.data.config.aspectRatio);
|
|
273
273
|
output = await exportSlides({
|
|
@@ -305,7 +305,7 @@ function printInfo(options, port, remote) {
|
|
|
305
305
|
console.log();
|
|
306
306
|
console.log();
|
|
307
307
|
console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
|
|
308
|
-
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${
|
|
308
|
+
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkEN47OEVJjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
|
|
309
309
|
console.log();
|
|
310
310
|
console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
|
|
311
311
|
console.log(_kolorist.dim.call(void 0, " entry ") + _kolorist.dim.call(void 0, _path2.default.dirname(options.entry) + _path2.default.sep) + _path2.default.basename(options.entry));
|
package/dist/cli.mjs
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
resolveOptions,
|
|
7
7
|
resolveThemeName,
|
|
8
8
|
version
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4BYU5VF4.mjs";
|
|
10
10
|
import {
|
|
11
11
|
require_fast_deep_equal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4NHF5SPM.mjs";
|
|
13
13
|
import {
|
|
14
14
|
__dirname,
|
|
15
15
|
__require,
|
|
@@ -171,7 +171,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
171
171
|
type: "boolean",
|
|
172
172
|
describe: "allow download as PDF"
|
|
173
173
|
}).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
|
|
174
|
-
const { build } = await Promise.resolve().then(() => __toESM(__require("./build-
|
|
174
|
+
const { build } = await Promise.resolve().then(() => __toESM(__require("./build-F5QDKRVS.mjs")));
|
|
175
175
|
const options = await resolveOptions({ entry, theme }, "build");
|
|
176
176
|
if (download && !options.data.config.download)
|
|
177
177
|
options.data.config.download = download;
|
package/dist/index.js
CHANGED
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkEN47OEVJjs = require('./chunk-EN47OEVJ.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkXIB52LE6js = require('./chunk-XIB52LE6.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkSQLX75IOjs = require('./chunk-SQLX75IO.js');
|
|
@@ -36,4 +36,4 @@ _chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
exports.ViteSlidevPlugin =
|
|
39
|
+
exports.ViteSlidevPlugin = _chunkXIB52LE6js.ViteSlidevPlugin; exports.createServer = _chunkEN47OEVJjs.createServer; exports.createWindiCSSPlugin = _chunkXIB52LE6js.createWindiCSSPlugin; exports.getAddonRoots = _chunkEN47OEVJjs.getAddonRoots; exports.getCLIRoot = _chunkEN47OEVJjs.getCLIRoot; exports.getClientRoot = _chunkEN47OEVJjs.getClientRoot; exports.getRoot = _chunkEN47OEVJjs.getRoot; exports.getThemeRoots = _chunkEN47OEVJjs.getThemeRoots; exports.getUserRoot = _chunkEN47OEVJjs.getUserRoot; exports.isPath = _chunkEN47OEVJjs.isPath; exports.parser = _chunkEN47OEVJjs.parser; exports.resolveOptions = _chunkEN47OEVJjs.resolveOptions;
|
package/dist/index.mjs
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
isPath,
|
|
10
10
|
parser,
|
|
11
11
|
resolveOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4BYU5VF4.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ViteSlidevPlugin,
|
|
15
15
|
createWindiCSSPlugin
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4NHF5SPM.mjs";
|
|
17
17
|
import {
|
|
18
18
|
init_esm_shims
|
|
19
19
|
} from "./chunk-GVA336JI.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@antfu/utils": "^0.5.2",
|
|
46
46
|
"@iconify-json/carbon": "^1.1.6",
|
|
47
47
|
"@iconify-json/ph": "^1.1.2",
|
|
48
|
-
"@slidev/client": "0.34.
|
|
49
|
-
"@slidev/parser": "0.34.
|
|
50
|
-
"@slidev/types": "0.34.
|
|
48
|
+
"@slidev/client": "0.34.2",
|
|
49
|
+
"@slidev/parser": "0.34.2",
|
|
50
|
+
"@slidev/types": "0.34.2",
|
|
51
51
|
"@vitejs/plugin-vue": "^2.3.3",
|
|
52
52
|
"@vue/compiler-sfc": "^3.2.37",
|
|
53
53
|
"cli-progress": "^3.11.2",
|