@slidev/cli 0.34.3 → 0.35.0
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-3A4647TA.js → build-7GBS35MR.js} +5 -5
- package/dist/{build-A6ASQ6Y3.mjs → build-ZXP7BI52.mjs} +1 -1
- package/dist/{chunk-C3EQABQP.mjs → chunk-BYR4MB7V.mjs} +24 -6
- package/dist/{chunk-4MU7RGP4.js → chunk-SZ24GYH2.js} +8 -7
- package/dist/{chunk-VI5P2KM6.mjs → chunk-TFFDXUDQ.mjs} +8 -7
- package/dist/{chunk-DQTRW726.js → chunk-ZFMQVVWY.js} +27 -9
- 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 +16 -16
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkSZ24GYH2js = require('./chunk-SZ24GYH2.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 _chunkSZ24GYH2js.getIndexHtml.call(void 0, options), "utf-8");
|
|
659
659
|
let config = void 0;
|
|
660
660
|
try {
|
|
661
|
-
const inlineConfig = await
|
|
661
|
+
const inlineConfig = await _chunkSZ24GYH2js.mergeViteConfigs.call(void 0, options, viteConfig, {
|
|
662
662
|
root: options.userRoot,
|
|
663
663
|
plugins: [
|
|
664
|
-
await
|
|
664
|
+
await _chunkSZ24GYH2js.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 _chunkSZ24GYH2js.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-TFFDXUDQ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__dirname,
|
|
@@ -2399,16 +2399,16 @@ init_esm_shims();
|
|
|
2399
2399
|
import * as parser from "@slidev/parser/fs";
|
|
2400
2400
|
|
|
2401
2401
|
// package.json
|
|
2402
|
-
var version = "0.
|
|
2402
|
+
var version = "0.35.0";
|
|
2403
2403
|
|
|
2404
2404
|
// node/themes.ts
|
|
2405
2405
|
init_esm_shims();
|
|
2406
2406
|
import prompts2 from "prompts";
|
|
2407
2407
|
|
|
2408
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.
|
|
2408
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.17.2/node_modules/@antfu/ni/dist/index.mjs
|
|
2409
2409
|
init_esm_shims();
|
|
2410
2410
|
|
|
2411
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.
|
|
2411
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.17.2/node_modules/@antfu/ni/dist/chunks/runner.mjs
|
|
2412
2412
|
init_esm_shims();
|
|
2413
2413
|
import require$$0, { resolve } from "path";
|
|
2414
2414
|
import require$$0$5 from "readline";
|
|
@@ -2428,7 +2428,7 @@ import require$$0$3 from "stream";
|
|
|
2428
2428
|
import require$$2$1 from "util";
|
|
2429
2429
|
import { promises } from "fs";
|
|
2430
2430
|
import require$$1 from "tty";
|
|
2431
|
-
var version2 = "0.
|
|
2431
|
+
var version2 = "0.17.2";
|
|
2432
2432
|
var npmRun = (agent) => (args) => {
|
|
2433
2433
|
if (args.length > 1)
|
|
2434
2434
|
return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
|
|
@@ -2461,6 +2461,19 @@ var pnpm = {
|
|
|
2461
2461
|
"uninstall": "pnpm remove {0}",
|
|
2462
2462
|
"global_uninstall": "pnpm remove --global {0}"
|
|
2463
2463
|
};
|
|
2464
|
+
var bun = {
|
|
2465
|
+
"agent": "bun {0}",
|
|
2466
|
+
"run": "bun run {0}",
|
|
2467
|
+
"install": "bun install {0}",
|
|
2468
|
+
"frozen": "bun install --no-save",
|
|
2469
|
+
"global": "bun add -g {0}",
|
|
2470
|
+
"add": "bun add {0}",
|
|
2471
|
+
"upgrade": null,
|
|
2472
|
+
"upgrade-interactive": null,
|
|
2473
|
+
"execute": null,
|
|
2474
|
+
"uninstall": "bun remove {0}",
|
|
2475
|
+
"global_uninstall": "bun remove -g {0}"
|
|
2476
|
+
};
|
|
2464
2477
|
var AGENTS = {
|
|
2465
2478
|
"npm": {
|
|
2466
2479
|
"agent": "npm {0}",
|
|
@@ -2488,16 +2501,19 @@ var AGENTS = {
|
|
|
2488
2501
|
"pnpm@6": {
|
|
2489
2502
|
...pnpm,
|
|
2490
2503
|
run: npmRun("pnpm")
|
|
2491
|
-
}
|
|
2504
|
+
},
|
|
2505
|
+
"bun": bun
|
|
2492
2506
|
};
|
|
2493
2507
|
var agents = Object.keys(AGENTS);
|
|
2494
2508
|
var LOCKS = {
|
|
2509
|
+
"bun.lockb": "bun",
|
|
2495
2510
|
"pnpm-lock.yaml": "pnpm",
|
|
2496
2511
|
"yarn.lock": "yarn",
|
|
2497
2512
|
"package-lock.json": "npm",
|
|
2498
2513
|
"npm-shrinkwrap.json": "npm"
|
|
2499
2514
|
};
|
|
2500
2515
|
var INSTALL_PAGE = {
|
|
2516
|
+
"bun": "https://bun.sh",
|
|
2501
2517
|
"pnpm": "https://pnpm.js.org/en/installation",
|
|
2502
2518
|
"pnpm@6": "https://pnpm.js.org/en/installation",
|
|
2503
2519
|
"yarn": "https://classic.yarnpkg.com/en/docs/install",
|
|
@@ -2739,6 +2755,8 @@ var parseNi = (agent, args, ctx) => {
|
|
|
2739
2755
|
console.log(`@antfu/ni v${version2}`);
|
|
2740
2756
|
process.exit(0);
|
|
2741
2757
|
}
|
|
2758
|
+
if (agent === "bun")
|
|
2759
|
+
args = args.map((i) => i === "-D" ? "-d" : i);
|
|
2742
2760
|
if (args.includes("-g"))
|
|
2743
2761
|
return getCommand(agent, "global", exclude(args, "-g"));
|
|
2744
2762
|
if (args.includes("--frozen-if-present")) {
|
|
@@ -268,9 +268,10 @@ var dependencies = {
|
|
|
268
268
|
"@antfu/utils": "^0.5.2",
|
|
269
269
|
"@slidev/parser": "workspace:*",
|
|
270
270
|
"@slidev/types": "workspace:*",
|
|
271
|
-
"@unocss/reset": "^0.
|
|
272
|
-
"@vueuse/core": "^
|
|
273
|
-
"@vueuse/head": "^0.7.
|
|
271
|
+
"@unocss/reset": "^0.45.1",
|
|
272
|
+
"@vueuse/core": "^9.0.1",
|
|
273
|
+
"@vueuse/head": "^0.7.8",
|
|
274
|
+
"@vueuse/math": "^9.0.1",
|
|
274
275
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
275
276
|
codemirror: "^5.65.5",
|
|
276
277
|
defu: "^6.0.0",
|
|
@@ -285,12 +286,12 @@ var dependencies = {
|
|
|
285
286
|
prettier: "^2.7.1",
|
|
286
287
|
recordrtc: "^5.6.2",
|
|
287
288
|
resolve: "^1.22.1",
|
|
288
|
-
unocss: "^0.
|
|
289
|
-
"vite-plugin-windicss": "^1.8.
|
|
289
|
+
unocss: "^0.45.1",
|
|
290
|
+
"vite-plugin-windicss": "^1.8.7",
|
|
290
291
|
vue: "^3.2.37",
|
|
291
|
-
"vue-router": "^4.
|
|
292
|
+
"vue-router": "^4.1.3",
|
|
292
293
|
"vue-starport": "^0.3.0",
|
|
293
|
-
windicss: "^3.5.
|
|
294
|
+
windicss: "^3.5.6"
|
|
294
295
|
};
|
|
295
296
|
|
|
296
297
|
// node/vite/searchRoot.ts
|
|
@@ -269,9 +269,10 @@ var dependencies = {
|
|
|
269
269
|
"@antfu/utils": "^0.5.2",
|
|
270
270
|
"@slidev/parser": "workspace:*",
|
|
271
271
|
"@slidev/types": "workspace:*",
|
|
272
|
-
"@unocss/reset": "^0.
|
|
273
|
-
"@vueuse/core": "^
|
|
274
|
-
"@vueuse/head": "^0.7.
|
|
272
|
+
"@unocss/reset": "^0.45.1",
|
|
273
|
+
"@vueuse/core": "^9.0.1",
|
|
274
|
+
"@vueuse/head": "^0.7.8",
|
|
275
|
+
"@vueuse/math": "^9.0.1",
|
|
275
276
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
276
277
|
codemirror: "^5.65.5",
|
|
277
278
|
defu: "^6.0.0",
|
|
@@ -286,12 +287,12 @@ var dependencies = {
|
|
|
286
287
|
prettier: "^2.7.1",
|
|
287
288
|
recordrtc: "^5.6.2",
|
|
288
289
|
resolve: "^1.22.1",
|
|
289
|
-
unocss: "^0.
|
|
290
|
-
"vite-plugin-windicss": "^1.8.
|
|
290
|
+
unocss: "^0.45.1",
|
|
291
|
+
"vite-plugin-windicss": "^1.8.7",
|
|
291
292
|
vue: "^3.2.37",
|
|
292
|
-
"vue-router": "^4.
|
|
293
|
+
"vue-router": "^4.1.3",
|
|
293
294
|
"vue-starport": "^0.3.0",
|
|
294
|
-
windicss: "^3.5.
|
|
295
|
+
windicss: "^3.5.6"
|
|
295
296
|
};
|
|
296
297
|
|
|
297
298
|
// node/vite/searchRoot.ts
|
|
@@ -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 _chunkSZ24GYH2js = require('./chunk-SZ24GYH2.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 _chunkSZ24GYH2js.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 _chunkSZ24GYH2js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
2391
2391
|
]
|
|
2392
2392
|
}, "serve"));
|
|
2393
2393
|
return server;
|
|
@@ -2398,16 +2398,16 @@ _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.
|
|
2401
|
+
var version = "0.35.0";
|
|
2402
2402
|
|
|
2403
2403
|
// node/themes.ts
|
|
2404
2404
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
2405
2405
|
var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
|
|
2406
2406
|
|
|
2407
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.
|
|
2407
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.17.2/node_modules/@antfu/ni/dist/index.mjs
|
|
2408
2408
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
2409
2409
|
|
|
2410
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.
|
|
2410
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.17.2/node_modules/@antfu/ni/dist/chunks/runner.mjs
|
|
2411
2411
|
_chunkSQLX75IOjs.init_cjs_shims.call(void 0, );
|
|
2412
2412
|
|
|
2413
2413
|
var _readline = require('readline'); var _readline2 = _interopRequireDefault(_readline);
|
|
@@ -2427,7 +2427,7 @@ var _stream = require('stream'); var _stream2 = _interopRequireDefault(_stream);
|
|
|
2427
2427
|
var _util = require('util'); var _util2 = _interopRequireDefault(_util);
|
|
2428
2428
|
|
|
2429
2429
|
var _tty = require('tty'); var _tty2 = _interopRequireDefault(_tty);
|
|
2430
|
-
var version2 = "0.
|
|
2430
|
+
var version2 = "0.17.2";
|
|
2431
2431
|
var npmRun = (agent) => (args) => {
|
|
2432
2432
|
if (args.length > 1)
|
|
2433
2433
|
return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
|
|
@@ -2460,6 +2460,19 @@ var pnpm = {
|
|
|
2460
2460
|
"uninstall": "pnpm remove {0}",
|
|
2461
2461
|
"global_uninstall": "pnpm remove --global {0}"
|
|
2462
2462
|
};
|
|
2463
|
+
var bun = {
|
|
2464
|
+
"agent": "bun {0}",
|
|
2465
|
+
"run": "bun run {0}",
|
|
2466
|
+
"install": "bun install {0}",
|
|
2467
|
+
"frozen": "bun install --no-save",
|
|
2468
|
+
"global": "bun add -g {0}",
|
|
2469
|
+
"add": "bun add {0}",
|
|
2470
|
+
"upgrade": null,
|
|
2471
|
+
"upgrade-interactive": null,
|
|
2472
|
+
"execute": null,
|
|
2473
|
+
"uninstall": "bun remove {0}",
|
|
2474
|
+
"global_uninstall": "bun remove -g {0}"
|
|
2475
|
+
};
|
|
2463
2476
|
var AGENTS = {
|
|
2464
2477
|
"npm": {
|
|
2465
2478
|
"agent": "npm {0}",
|
|
@@ -2487,16 +2500,19 @@ var AGENTS = {
|
|
|
2487
2500
|
"pnpm@6": {
|
|
2488
2501
|
...pnpm,
|
|
2489
2502
|
run: npmRun("pnpm")
|
|
2490
|
-
}
|
|
2503
|
+
},
|
|
2504
|
+
"bun": bun
|
|
2491
2505
|
};
|
|
2492
2506
|
var agents = Object.keys(AGENTS);
|
|
2493
2507
|
var LOCKS = {
|
|
2508
|
+
"bun.lockb": "bun",
|
|
2494
2509
|
"pnpm-lock.yaml": "pnpm",
|
|
2495
2510
|
"yarn.lock": "yarn",
|
|
2496
2511
|
"package-lock.json": "npm",
|
|
2497
2512
|
"npm-shrinkwrap.json": "npm"
|
|
2498
2513
|
};
|
|
2499
2514
|
var INSTALL_PAGE = {
|
|
2515
|
+
"bun": "https://bun.sh",
|
|
2500
2516
|
"pnpm": "https://pnpm.js.org/en/installation",
|
|
2501
2517
|
"pnpm@6": "https://pnpm.js.org/en/installation",
|
|
2502
2518
|
"yarn": "https://classic.yarnpkg.com/en/docs/install",
|
|
@@ -2738,6 +2754,8 @@ var parseNi = (agent, args, ctx) => {
|
|
|
2738
2754
|
console.log(`@antfu/ni v${version2}`);
|
|
2739
2755
|
process.exit(0);
|
|
2740
2756
|
}
|
|
2757
|
+
if (agent === "bun")
|
|
2758
|
+
args = args.map((i) => i === "-D" ? "-d" : i);
|
|
2741
2759
|
if (args.includes("-g"))
|
|
2742
2760
|
return getCommand(agent, "global", exclude(args, "-g"));
|
|
2743
2761
|
if (args.includes("--frozen-if-present")) {
|
|
@@ -9488,7 +9506,7 @@ async function run(fn, args, options = {}) {
|
|
|
9488
9506
|
await execaCommand(command, { stdio: "inherit", encoding: "utf-8", cwd });
|
|
9489
9507
|
}
|
|
9490
9508
|
|
|
9491
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.
|
|
9509
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.17.2/node_modules/@antfu/ni/dist/index.mjs
|
|
9492
9510
|
|
|
9493
9511
|
|
|
9494
9512
|
|
package/dist/cli.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZFMQVVWYjs = require('./chunk-ZFMQVVWY.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkSZ24GYH2js = require('./chunk-SZ24GYH2.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, _chunkSZ24GYH2js.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(_chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
|
|
85
85
|
port = userPort || await findFreePort(3030);
|
|
86
|
-
server = await
|
|
86
|
+
server = await _chunkZFMQVVWYjs.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 && _chunkZFMQVVWYjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkZFMQVVWYjs.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-7GBS35MR.js")));
|
|
174
|
+
const options = await _chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.parser.load(entry);
|
|
188
|
+
_chunkZFMQVVWYjs.parser.prettify(data);
|
|
189
|
+
await _chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.parser.load(entry);
|
|
197
|
+
const theme = _chunkZFMQVVWYjs.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 (_chunkZFMQVVWYjs.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 = _chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.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 _chunkZFMQVVWYjs.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
|
+
_chunkZFMQVVWYjs.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${_chunkZFMQVVWYjs.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-BYR4MB7V.mjs";
|
|
10
10
|
import {
|
|
11
11
|
require_fast_deep_equal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TFFDXUDQ.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-ZXP7BI52.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 _chunkZFMQVVWYjs = require('./chunk-ZFMQVVWY.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkSZ24GYH2js = require('./chunk-SZ24GYH2.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 = _chunkSZ24GYH2js.ViteSlidevPlugin; exports.createServer = _chunkZFMQVVWYjs.createServer; exports.createWindiCSSPlugin = _chunkSZ24GYH2js.createWindiCSSPlugin; exports.getAddonRoots = _chunkZFMQVVWYjs.getAddonRoots; exports.getCLIRoot = _chunkZFMQVVWYjs.getCLIRoot; exports.getClientRoot = _chunkZFMQVVWYjs.getClientRoot; exports.getRoot = _chunkZFMQVVWYjs.getRoot; exports.getThemeRoots = _chunkZFMQVVWYjs.getThemeRoots; exports.getUserRoot = _chunkZFMQVVWYjs.getUserRoot; exports.isPath = _chunkZFMQVVWYjs.isPath; exports.parser = _chunkZFMQVVWYjs.parser; exports.resolveOptions = _chunkZFMQVVWYjs.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-BYR4MB7V.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ViteSlidevPlugin,
|
|
15
15
|
createWindiCSSPlugin
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TFFDXUDQ.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.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@antfu/utils": "^0.5.2",
|
|
46
|
-
"@hedgedoc/markdown-it-task-lists": "^1.0.
|
|
47
|
-
"@iconify-json/carbon": "^1.1.
|
|
46
|
+
"@hedgedoc/markdown-it-task-lists": "^1.0.5",
|
|
47
|
+
"@iconify-json/carbon": "^1.1.7",
|
|
48
48
|
"@iconify-json/ph": "^1.1.2",
|
|
49
|
-
"@slidev/client": "0.
|
|
50
|
-
"@slidev/parser": "0.
|
|
51
|
-
"@slidev/types": "0.
|
|
52
|
-
"@vitejs/plugin-vue": "^
|
|
49
|
+
"@slidev/client": "0.35.0",
|
|
50
|
+
"@slidev/parser": "0.35.0",
|
|
51
|
+
"@slidev/types": "0.35.0",
|
|
52
|
+
"@vitejs/plugin-vue": "^3.0.1",
|
|
53
53
|
"@vue/compiler-sfc": "^3.2.37",
|
|
54
54
|
"cli-progress": "^3.11.2",
|
|
55
55
|
"codemirror": "^5.65.5",
|
|
@@ -78,16 +78,16 @@
|
|
|
78
78
|
"resolve-from": "^5.0.0",
|
|
79
79
|
"resolve-global": "^1.0.0",
|
|
80
80
|
"shiki": "^0.10.1",
|
|
81
|
-
"unocss": "^0.
|
|
82
|
-
"unplugin-icons": "^0.14.
|
|
83
|
-
"unplugin-vue-components": "^0.
|
|
84
|
-
"vite": "^
|
|
85
|
-
"vite-plugin-remote-assets": "^0.
|
|
86
|
-
"vite-plugin-vue-markdown": "^0.
|
|
87
|
-
"vite-plugin-vue-server-ref": "^0.
|
|
88
|
-
"vite-plugin-windicss": "^1.8.
|
|
81
|
+
"unocss": "^0.45.1",
|
|
82
|
+
"unplugin-icons": "^0.14.8",
|
|
83
|
+
"unplugin-vue-components": "^0.21.2",
|
|
84
|
+
"vite": "^3.0.4",
|
|
85
|
+
"vite-plugin-remote-assets": "^0.3.0",
|
|
86
|
+
"vite-plugin-vue-markdown": "^0.21.1",
|
|
87
|
+
"vite-plugin-vue-server-ref": "^0.3.0",
|
|
88
|
+
"vite-plugin-windicss": "^1.8.7",
|
|
89
89
|
"vue": "^3.2.37",
|
|
90
|
-
"windicss": "^3.5.
|
|
90
|
+
"windicss": "^3.5.6",
|
|
91
91
|
"yargs": "^17.5.1"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|