@slidev/cli 0.25.7 → 0.25.8
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-K57CP2CX.mjs → build-FXRZQAN2.mjs} +1 -1
- package/dist/{build-T2TUHIA6.js → build-XEV6LBWL.js} +1 -1
- package/dist/{chunk-TJNUNL74.js → chunk-2XXXTIHT.js} +1 -1
- package/dist/{chunk-44AL4CPU.mjs → chunk-7EB4SFAT.mjs} +1 -1
- package/dist/cli.js +12 -12
- package/dist/cli.mjs +3 -3
- package/dist/{export-NTMD674W.mjs → export-OWXSZZNV.mjs} +1 -1
- package/dist/{export-YIJVRVAE.js → export-TB2WWC2X.js} +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
|
@@ -369,7 +369,7 @@ async function build(options, viteConfig = {}) {
|
|
|
369
369
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
370
370
|
`, "utf-8");
|
|
371
371
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
372
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
372
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-OWXSZZNV.mjs")));
|
|
373
373
|
const port = 12445;
|
|
374
374
|
const app = connect();
|
|
375
375
|
const server = http.createServer(app);
|
|
@@ -377,7 +377,7 @@ async function build(options, viteConfig = {}) {
|
|
|
377
377
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
378
378
|
`, "utf-8");
|
|
379
379
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
380
|
-
const { exportSlides } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./export-
|
|
380
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./export-TB2WWC2X.js")));
|
|
381
381
|
const port = 12445;
|
|
382
382
|
const app = _connect2.default.call(void 0, );
|
|
383
383
|
const server = _http2.default.createServer(app);
|
|
@@ -10144,7 +10144,7 @@ var require_semver2 = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
|
10144
10144
|
});
|
|
10145
10145
|
|
|
10146
10146
|
// package.json
|
|
10147
|
-
var version = "0.25.
|
|
10147
|
+
var version = "0.25.8";
|
|
10148
10148
|
|
|
10149
10149
|
// node/themes.ts
|
|
10150
10150
|
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
@@ -10094,7 +10094,7 @@ var require_semver2 = __commonJS({
|
|
|
10094
10094
|
});
|
|
10095
10095
|
|
|
10096
10096
|
// package.json
|
|
10097
|
-
var version = "0.25.
|
|
10097
|
+
var version = "0.25.8";
|
|
10098
10098
|
|
|
10099
10099
|
// node/themes.ts
|
|
10100
10100
|
var import_ni = __toModule(require_dist());
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ var _chunkDMF3GKR2js = require('./chunk-DMF3GKR2.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk2XXXTIHTjs = require('./chunk-2XXXTIHT.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunk5X4UZOIBjs = require('./chunk-5X4UZOIB.js');
|
|
@@ -42,7 +42,7 @@ var CONFIG_RESTART_FIELDS = [
|
|
|
42
42
|
"routerMode",
|
|
43
43
|
"fonts"
|
|
44
44
|
];
|
|
45
|
-
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(
|
|
45
|
+
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunk2XXXTIHTjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
|
|
46
46
|
cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
|
|
47
47
|
alias: "p",
|
|
48
48
|
type: "number",
|
|
@@ -86,7 +86,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
86
86
|
async function initServer() {
|
|
87
87
|
if (server)
|
|
88
88
|
await server.close();
|
|
89
|
-
const options = await
|
|
89
|
+
const options = await _chunk2XXXTIHTjs.resolveOptions.call(void 0, { entry, theme }, "dev");
|
|
90
90
|
port = userPort || await findFreePort(3030);
|
|
91
91
|
server = await _chunkDMF3GKR2js.createServer.call(void 0, options, {
|
|
92
92
|
server: {
|
|
@@ -99,7 +99,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
99
99
|
logLevel: log
|
|
100
100
|
}, {
|
|
101
101
|
onDataReload(newData, data) {
|
|
102
|
-
if (!theme &&
|
|
102
|
+
if (!theme && _chunk2XXXTIHTjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunk2XXXTIHTjs.resolveThemeName.call(void 0, data.config.theme)) {
|
|
103
103
|
console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
|
|
104
104
|
initServer();
|
|
105
105
|
} else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
|
|
@@ -169,8 +169,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
169
169
|
type: "boolean",
|
|
170
170
|
describe: "allow download as PDF"
|
|
171
171
|
}).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
|
|
172
|
-
const { build } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./build-
|
|
173
|
-
const options = await
|
|
172
|
+
const { build } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./build-XEV6LBWL.js")));
|
|
173
|
+
const options = await _chunk2XXXTIHTjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
174
174
|
if (download && !options.data.config.download)
|
|
175
175
|
options.data.config.download = download;
|
|
176
176
|
printInfo(options);
|
|
@@ -193,16 +193,16 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
|
193
193
|
default: "theme"
|
|
194
194
|
}), async ({ entry, dir, theme: themeInput }) => {
|
|
195
195
|
const data = await _fs.load.call(void 0, entry);
|
|
196
|
-
const theme =
|
|
196
|
+
const theme = _chunk2XXXTIHTjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
|
|
197
197
|
if (theme === "none") {
|
|
198
198
|
console.error('Can not eject theme "none"');
|
|
199
199
|
process.exit(1);
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
201
|
+
if (_chunk2XXXTIHTjs.isPath.call(void 0, theme)) {
|
|
202
202
|
console.error("Theme is already ejected");
|
|
203
203
|
process.exit(1);
|
|
204
204
|
}
|
|
205
|
-
const roots =
|
|
205
|
+
const roots = _chunk2XXXTIHTjs.getThemeRoots.call(void 0, theme, entry);
|
|
206
206
|
if (!roots.length) {
|
|
207
207
|
console.error(`Does not found theme "${theme}"`);
|
|
208
208
|
process.exit(1);
|
|
@@ -257,9 +257,9 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
|
|
|
257
257
|
}) => {
|
|
258
258
|
output = output || `${_path2.default.basename(entry, ".md")}-export`;
|
|
259
259
|
process.env.NODE_ENV = "production";
|
|
260
|
-
const { exportSlides } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./export-
|
|
260
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./export-TB2WWC2X.js")));
|
|
261
261
|
const port = await findFreePort(12445);
|
|
262
|
-
const options = await
|
|
262
|
+
const options = await _chunk2XXXTIHTjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
263
263
|
const server = await _chunkDMF3GKR2js.createServer.call(void 0, options, {
|
|
264
264
|
server: { port },
|
|
265
265
|
logLevel: "error",
|
|
@@ -304,7 +304,7 @@ function printInfo(options, port, remote) {
|
|
|
304
304
|
console.log();
|
|
305
305
|
console.log();
|
|
306
306
|
console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
|
|
307
|
-
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${
|
|
307
|
+
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunk2XXXTIHTjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
|
|
308
308
|
console.log();
|
|
309
309
|
console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
|
|
310
310
|
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
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveOptions,
|
|
8
8
|
resolveThemeName,
|
|
9
9
|
version
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7EB4SFAT.mjs";
|
|
11
11
|
import {
|
|
12
12
|
require_fast_deep_equal
|
|
13
13
|
} from "./chunk-ZYM6IFT5.mjs";
|
|
@@ -167,7 +167,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
167
167
|
type: "boolean",
|
|
168
168
|
describe: "allow download as PDF"
|
|
169
169
|
}).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
|
|
170
|
-
const { build } = await Promise.resolve().then(() => __toModule(__require("./build-
|
|
170
|
+
const { build } = await Promise.resolve().then(() => __toModule(__require("./build-FXRZQAN2.mjs")));
|
|
171
171
|
const options = await resolveOptions({ entry, theme }, "build");
|
|
172
172
|
if (download && !options.data.config.download)
|
|
173
173
|
options.data.config.download = download;
|
|
@@ -255,7 +255,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
|
|
|
255
255
|
}) => {
|
|
256
256
|
output = output || `${path.basename(entry, ".md")}-export`;
|
|
257
257
|
process.env.NODE_ENV = "production";
|
|
258
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
258
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-OWXSZZNV.mjs")));
|
|
259
259
|
const port = await findFreePort(12445);
|
|
260
260
|
const options = await resolveOptions({ entry, theme }, "build");
|
|
261
261
|
const server = await createServer(options, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2XXXTIHTjs = require('./chunk-2XXXTIHT.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ async function exportSlides({
|
|
|
62
62
|
height = 1080,
|
|
63
63
|
withClicks = false
|
|
64
64
|
}) {
|
|
65
|
-
if (!
|
|
65
|
+
if (!_chunk2XXXTIHTjs.packageExists.call(void 0, "playwright-chromium"))
|
|
66
66
|
throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i playwright-chromium`");
|
|
67
67
|
const { chromium } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "playwright-chromium")));
|
|
68
68
|
const browser = await chromium.launch();
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ var _chunkDMF3GKR2js = require('./chunk-DMF3GKR2.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk2XXXTIHTjs = require('./chunk-2XXXTIHT.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -34,4 +34,4 @@ var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
exports.ViteSlidevPlugin = _chunk5X4UZOIBjs.ViteSlidevPlugin; exports.createServer = _chunkDMF3GKR2js.createServer; exports.createWindiCSSPlugin = _chunk5X4UZOIBjs.createWindiCSSPlugin; exports.getCLIRoot =
|
|
37
|
+
exports.ViteSlidevPlugin = _chunk5X4UZOIBjs.ViteSlidevPlugin; exports.createServer = _chunkDMF3GKR2js.createServer; exports.createWindiCSSPlugin = _chunk5X4UZOIBjs.createWindiCSSPlugin; exports.getCLIRoot = _chunk2XXXTIHTjs.getCLIRoot; exports.getClientRoot = _chunk2XXXTIHTjs.getClientRoot; exports.getThemeRoots = _chunk2XXXTIHTjs.getThemeRoots; exports.isPath = _chunk2XXXTIHTjs.isPath; exports.parser = parser; exports.resolveOptions = _chunk2XXXTIHTjs.resolveOptions;
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.8",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"homepage": "https://sli.dev",
|
|
6
6
|
"bugs": "https://github.com/slidevjs/slidev/issues",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@antfu/utils": "^0.3.0",
|
|
43
|
-
"@iconify/json": "^1.1.
|
|
44
|
-
"@slidev/client": "0.25.
|
|
45
|
-
"@slidev/parser": "0.25.
|
|
46
|
-
"@slidev/types": "0.25.
|
|
43
|
+
"@iconify/json": "^1.1.406",
|
|
44
|
+
"@slidev/client": "0.25.8",
|
|
45
|
+
"@slidev/parser": "0.25.8",
|
|
46
|
+
"@slidev/types": "0.25.8",
|
|
47
47
|
"@vitejs/plugin-vue": "^1.9.2",
|
|
48
48
|
"@vue/compiler-sfc": "^3.2.19",
|
|
49
49
|
"cli-progress": "^3.9.1",
|