@slidev/cli 0.30.2 → 0.30.3
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-YFDGZUAK.mjs → build-6SGXHSD5.mjs} +2 -2
- package/dist/{build-23SNLQAJ.js → build-RLDXLLAM.js} +4 -4
- package/dist/{chunk-OII7IQD2.mjs → chunk-42RALHAU.mjs} +3 -2
- package/dist/{chunk-MBZTOLHN.mjs → chunk-4YPIBI4G.mjs} +5 -3
- package/dist/{chunk-E4IOOAKN.js → chunk-CIB2BRE3.js} +2 -2
- package/dist/{chunk-O57F34AM.mjs → chunk-LCOJZNZW.mjs} +1 -1
- package/dist/{chunk-2LNCAUCD.js → chunk-PL62CCCK.js} +3 -2
- package/dist/{chunk-RSHUQSN4.js → chunk-RBYAPROQ.js} +5 -3
- package/dist/cli.js +23 -23
- package/dist/cli.mjs +5 -5
- package/dist/{export-RFCVIBYE.mjs → export-DGMIRITW.mjs} +1 -1
- package/dist/{export-AKEY52VC.js → export-PXKH5FVD.js} +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4YPIBI4G.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__require,
|
|
7
7
|
__spreadValues,
|
|
@@ -713,7 +713,7 @@ async function build(options, viteConfig = {}) {
|
|
|
713
713
|
await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
714
714
|
`, "utf-8");
|
|
715
715
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
716
|
-
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-
|
|
716
|
+
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-DGMIRITW.mjs")));
|
|
717
717
|
const port = 12445;
|
|
718
718
|
const app = connect();
|
|
719
719
|
const server = http.createServer(app);
|
|
@@ -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 _chunkRBYAPROQjs = require('./chunk-RBYAPROQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -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 _chunkRBYAPROQjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
659
659
|
let config = void 0;
|
|
660
660
|
try {
|
|
661
661
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
662
662
|
root: options.userRoot,
|
|
663
663
|
plugins: [
|
|
664
|
-
await
|
|
664
|
+
await _chunkRBYAPROQjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
665
665
|
{
|
|
666
666
|
name: "resolve-config",
|
|
667
667
|
configResolved(_config) {
|
|
@@ -713,7 +713,7 @@ async function build(options, viteConfig = {}) {
|
|
|
713
713
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
714
714
|
`, "utf-8");
|
|
715
715
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
716
|
-
const { exportSlides } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./export-
|
|
716
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./export-PXKH5FVD.js")));
|
|
717
717
|
const port = 12445;
|
|
718
718
|
const app = _connect2.default.call(void 0, );
|
|
719
719
|
const server = _http2.default.createServer(app);
|
|
@@ -5110,7 +5110,8 @@ function resolveConfig(headmatter, themeMeta = {}) {
|
|
|
5110
5110
|
fonts: {},
|
|
5111
5111
|
favicon: "https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",
|
|
5112
5112
|
drawings: {},
|
|
5113
|
-
plantUmlServer: "https://www.plantuml.com/plantuml"
|
|
5113
|
+
plantUmlServer: "https://www.plantuml.com/plantuml",
|
|
5114
|
+
record: "dev"
|
|
5114
5115
|
};
|
|
5115
5116
|
const config2 = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, defaultConfig2), themeMeta.defaults), headmatter.config), headmatter), {
|
|
5116
5117
|
fonts: resolveFonts(__spreadValues(__spreadValues(__spreadValues({}, (_a = themeMeta.defaults) == null ? void 0 : _a.fonts), (_b = headmatter.config) == null ? void 0 : _b.fonts), headmatter == null ? void 0 : headmatter.fonts)),
|
|
@@ -5429,7 +5430,7 @@ async function saveExternalSlide(slide) {
|
|
|
5429
5430
|
init_esm_shims();
|
|
5430
5431
|
|
|
5431
5432
|
// package.json
|
|
5432
|
-
var version = "0.30.
|
|
5433
|
+
var version = "0.30.3";
|
|
5433
5434
|
|
|
5434
5435
|
// node/themes.ts
|
|
5435
5436
|
init_esm_shims();
|
|
@@ -388,6 +388,7 @@ function getDefine(options) {
|
|
|
388
388
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
389
389
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
390
390
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
391
|
+
__SLIDEV_FEATURE_RECORD__: JSON.stringify(options.data.config.record === true || options.data.config.record === options.mode),
|
|
391
392
|
__DEV__: options.mode === "dev" ? "true" : "false"
|
|
392
393
|
};
|
|
393
394
|
}
|
|
@@ -796,7 +797,7 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
796
797
|
let no = 1;
|
|
797
798
|
const routes = [
|
|
798
799
|
...data.slides.map((i, idx) => {
|
|
799
|
-
var _a, _b;
|
|
800
|
+
var _a, _b, _c, _d;
|
|
800
801
|
if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
|
|
801
802
|
return void 0;
|
|
802
803
|
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
|
|
@@ -816,9 +817,10 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
816
817
|
};
|
|
817
818
|
const meta = Object.assign({}, i.frontmatter, additions);
|
|
818
819
|
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
|
|
820
|
+
const redirect = ((_c = i.frontmatter) == null ? void 0 : _c.routeAlias) ? `{ path: '${(_d = i.frontmatter) == null ? void 0 : _d.routeAlias}', redirect: { path: '${no}' } }` : null;
|
|
819
821
|
no += 1;
|
|
820
|
-
return route;
|
|
821
|
-
}).filter(notNullish),
|
|
822
|
+
return [route, redirect];
|
|
823
|
+
}).flat().filter(notNullish),
|
|
822
824
|
`{ path: "${no}", component: __layout__end, meta: { layout: "end" } }`
|
|
823
825
|
];
|
|
824
826
|
const routesStr = `export default [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRBYAPROQjs = require('./chunk-RBYAPROQ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkIXNT7VMKjs = require('./chunk-IXNT7VMK.js');
|
|
@@ -20,7 +20,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
plugins: [
|
|
23
|
-
await
|
|
23
|
+
await _chunkRBYAPROQjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
24
24
|
]
|
|
25
25
|
}));
|
|
26
26
|
return server;
|
|
@@ -5110,7 +5110,8 @@ function resolveConfig(headmatter, themeMeta = {}) {
|
|
|
5110
5110
|
fonts: {},
|
|
5111
5111
|
favicon: "https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png",
|
|
5112
5112
|
drawings: {},
|
|
5113
|
-
plantUmlServer: "https://www.plantuml.com/plantuml"
|
|
5113
|
+
plantUmlServer: "https://www.plantuml.com/plantuml",
|
|
5114
|
+
record: "dev"
|
|
5114
5115
|
};
|
|
5115
5116
|
const config2 = _chunkIXNT7VMKjs.__spreadProps.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, {}, defaultConfig2), themeMeta.defaults), headmatter.config), headmatter), {
|
|
5116
5117
|
fonts: resolveFonts(_chunkIXNT7VMKjs.__spreadValues.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, _chunkIXNT7VMKjs.__spreadValues.call(void 0, {}, (_a = themeMeta.defaults) == null ? void 0 : _a.fonts), (_b = headmatter.config) == null ? void 0 : _b.fonts), headmatter == null ? void 0 : headmatter.fonts)),
|
|
@@ -5429,7 +5430,7 @@ async function saveExternalSlide(slide) {
|
|
|
5429
5430
|
_chunkIXNT7VMKjs.init_cjs_shims.call(void 0, );
|
|
5430
5431
|
|
|
5431
5432
|
// package.json
|
|
5432
|
-
var version = "0.30.
|
|
5433
|
+
var version = "0.30.3";
|
|
5433
5434
|
|
|
5434
5435
|
// node/themes.ts
|
|
5435
5436
|
_chunkIXNT7VMKjs.init_cjs_shims.call(void 0, );
|
|
@@ -387,6 +387,7 @@ function getDefine(options) {
|
|
|
387
387
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
388
388
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
389
389
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
390
|
+
__SLIDEV_FEATURE_RECORD__: JSON.stringify(options.data.config.record === true || options.data.config.record === options.mode),
|
|
390
391
|
__DEV__: options.mode === "dev" ? "true" : "false"
|
|
391
392
|
};
|
|
392
393
|
}
|
|
@@ -795,7 +796,7 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
795
796
|
let no = 1;
|
|
796
797
|
const routes = [
|
|
797
798
|
...data.slides.map((i, idx) => {
|
|
798
|
-
var _a, _b;
|
|
799
|
+
var _a, _b, _c, _d;
|
|
799
800
|
if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
|
|
800
801
|
return void 0;
|
|
801
802
|
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
|
|
@@ -815,9 +816,10 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
815
816
|
};
|
|
816
817
|
const meta = Object.assign({}, i.frontmatter, additions);
|
|
817
818
|
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
|
|
819
|
+
const redirect = ((_c = i.frontmatter) == null ? void 0 : _c.routeAlias) ? `{ path: '${(_d = i.frontmatter) == null ? void 0 : _d.routeAlias}', redirect: { path: '${no}' } }` : null;
|
|
818
820
|
no += 1;
|
|
819
|
-
return route;
|
|
820
|
-
}).filter(_utils.notNullish),
|
|
821
|
+
return [route, redirect];
|
|
822
|
+
}).flat().filter(_utils.notNullish),
|
|
821
823
|
`{ path: "${no}", component: __layout__end, meta: { layout: "end" } }`
|
|
822
824
|
];
|
|
823
825
|
const routesStr = `export default [
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict"; 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
|
-
var
|
|
3
|
+
var _chunkCIB2BRE3js = require('./chunk-CIB2BRE3.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ var _chunkE4IOOAKNjs = require('./chunk-E4IOOAKN.js');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkPL62CCCKjs = require('./chunk-PL62CCCK.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkRBYAPROQjs = require('./chunk-RBYAPROQ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -20,7 +20,7 @@ var _chunkIXNT7VMKjs = require('./chunk-IXNT7VMK.js');
|
|
|
20
20
|
|
|
21
21
|
// node/cli.ts
|
|
22
22
|
_chunkIXNT7VMKjs.init_cjs_shims.call(void 0, );
|
|
23
|
-
var import_fast_deep_equal = _chunkIXNT7VMKjs.__toESM.call(void 0,
|
|
23
|
+
var import_fast_deep_equal = _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkRBYAPROQjs.require_fast_deep_equal.call(void 0, ));
|
|
24
24
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
25
25
|
var _net = require('net'); var _net2 = _interopRequireDefault(_net);
|
|
26
26
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
@@ -38,7 +38,7 @@ var CONFIG_RESTART_FIELDS = [
|
|
|
38
38
|
"routerMode",
|
|
39
39
|
"fonts"
|
|
40
40
|
];
|
|
41
|
-
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(
|
|
41
|
+
var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkPL62CCCKjs.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",
|
|
@@ -82,9 +82,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
82
82
|
async function initServer() {
|
|
83
83
|
if (server)
|
|
84
84
|
await server.close();
|
|
85
|
-
const options = await
|
|
85
|
+
const options = await _chunkPL62CCCKjs.resolveOptions.call(void 0, { entry, theme }, "dev");
|
|
86
86
|
port = userPort || await findFreePort(3030);
|
|
87
|
-
server = await
|
|
87
|
+
server = await _chunkCIB2BRE3js.createServer.call(void 0, options, {
|
|
88
88
|
server: {
|
|
89
89
|
port,
|
|
90
90
|
strictPort: true,
|
|
@@ -95,7 +95,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
|
|
|
95
95
|
logLevel: log
|
|
96
96
|
}, {
|
|
97
97
|
onDataReload(newData, data) {
|
|
98
|
-
if (!theme &&
|
|
98
|
+
if (!theme && _chunkPL62CCCKjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkPL62CCCKjs.resolveThemeName.call(void 0, data.config.theme)) {
|
|
99
99
|
console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
|
|
100
100
|
initServer();
|
|
101
101
|
} else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
|
|
@@ -171,8 +171,8 @@ 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(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./build-
|
|
175
|
-
const options = await
|
|
174
|
+
const { build } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./build-RLDXLLAM.js")));
|
|
175
|
+
const options = await _chunkPL62CCCKjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
176
176
|
if (download && !options.data.config.download)
|
|
177
177
|
options.data.config.download = download;
|
|
178
178
|
printInfo(options);
|
|
@@ -185,26 +185,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
185
185
|
});
|
|
186
186
|
});
|
|
187
187
|
cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
|
|
188
|
-
const data = await
|
|
189
|
-
|
|
190
|
-
await
|
|
188
|
+
const data = await _chunkPL62CCCKjs.fs_exports.load(entry);
|
|
189
|
+
_chunkPL62CCCKjs.fs_exports.prettify(data);
|
|
190
|
+
await _chunkPL62CCCKjs.fs_exports.save(data);
|
|
191
191
|
});
|
|
192
192
|
cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
193
193
|
return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
|
|
194
194
|
type: "string",
|
|
195
195
|
default: "theme"
|
|
196
196
|
}), async ({ entry, dir, theme: themeInput }) => {
|
|
197
|
-
const data = await
|
|
198
|
-
const theme =
|
|
197
|
+
const data = await _chunkPL62CCCKjs.fs_exports.load(entry);
|
|
198
|
+
const theme = _chunkPL62CCCKjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
|
|
199
199
|
if (theme === "none") {
|
|
200
200
|
console.error('Can not eject theme "none"');
|
|
201
201
|
process.exit(1);
|
|
202
202
|
}
|
|
203
|
-
if (
|
|
203
|
+
if (_chunkPL62CCCKjs.isPath.call(void 0, theme)) {
|
|
204
204
|
console.error("Theme is already ejected");
|
|
205
205
|
process.exit(1);
|
|
206
206
|
}
|
|
207
|
-
const roots =
|
|
207
|
+
const roots = _chunkPL62CCCKjs.getThemeRoots.call(void 0, theme, entry);
|
|
208
208
|
if (!roots.length) {
|
|
209
209
|
console.error(`Does not found theme "${theme}"`);
|
|
210
210
|
process.exit(1);
|
|
@@ -216,7 +216,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
|
216
216
|
const dirPath = `./${dir}`;
|
|
217
217
|
data.slides[0].frontmatter.theme = dirPath;
|
|
218
218
|
data.slides[0].raw = null;
|
|
219
|
-
await
|
|
219
|
+
await _chunkPL62CCCKjs.fs_exports.save(data);
|
|
220
220
|
console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
|
|
221
221
|
});
|
|
222
222
|
}, () => {
|
|
@@ -258,17 +258,17 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
|
|
|
258
258
|
"with-clicks": withClicks
|
|
259
259
|
}) => {
|
|
260
260
|
process.env.NODE_ENV = "production";
|
|
261
|
-
const { exportSlides } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./export-
|
|
261
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "./export-PXKH5FVD.js")));
|
|
262
262
|
const port = await findFreePort(12445);
|
|
263
|
-
const options = await
|
|
263
|
+
const options = await _chunkPL62CCCKjs.resolveOptions.call(void 0, { entry, theme }, "build");
|
|
264
264
|
output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
|
|
265
|
-
const server = await
|
|
265
|
+
const server = await _chunkCIB2BRE3js.createServer.call(void 0, options, {
|
|
266
266
|
server: { port },
|
|
267
267
|
clearScreen: false
|
|
268
268
|
});
|
|
269
269
|
await server.listen(port);
|
|
270
270
|
printInfo(options);
|
|
271
|
-
|
|
271
|
+
_chunkPL62CCCKjs.fs_exports.filterDisabled(options.data);
|
|
272
272
|
const width = options.data.config.canvasWidth;
|
|
273
273
|
const height = Math.round(width / options.data.config.aspectRatio);
|
|
274
274
|
output = await exportSlides({
|
|
@@ -306,7 +306,7 @@ function printInfo(options, port, remote) {
|
|
|
306
306
|
console.log();
|
|
307
307
|
console.log();
|
|
308
308
|
console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
|
|
309
|
-
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${
|
|
309
|
+
console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkPL62CCCKjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
|
|
310
310
|
console.log();
|
|
311
311
|
console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
|
|
312
312
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LCOJZNZW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
fs_exports,
|
|
6
6
|
getThemeRoots,
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resolveOptions,
|
|
9
9
|
resolveThemeName,
|
|
10
10
|
version
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-42RALHAU.mjs";
|
|
12
12
|
import {
|
|
13
13
|
require_fast_deep_equal
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4YPIBI4G.mjs";
|
|
15
15
|
import {
|
|
16
16
|
__dirname,
|
|
17
17
|
__require,
|
|
@@ -172,7 +172,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
|
|
|
172
172
|
type: "boolean",
|
|
173
173
|
describe: "allow download as PDF"
|
|
174
174
|
}).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
|
|
175
|
-
const { build } = await Promise.resolve().then(() => __toESM(__require("./build-
|
|
175
|
+
const { build } = await Promise.resolve().then(() => __toESM(__require("./build-6SGXHSD5.mjs")));
|
|
176
176
|
const options = await resolveOptions({ entry, theme }, "build");
|
|
177
177
|
if (download && !options.data.config.download)
|
|
178
178
|
options.data.config.download = download;
|
|
@@ -259,7 +259,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
|
|
|
259
259
|
"with-clicks": withClicks
|
|
260
260
|
}) => {
|
|
261
261
|
process.env.NODE_ENV = "production";
|
|
262
|
-
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-
|
|
262
|
+
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-DGMIRITW.mjs")));
|
|
263
263
|
const port = await findFreePort(12445);
|
|
264
264
|
const options = await resolveOptions({ entry, theme }, "build");
|
|
265
265
|
output = output || options.data.config.exportFilename || `${path.basename(entry, ".md")}-export`;
|
|
@@ -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 _chunkPL62CCCKjs = require('./chunk-PL62CCCK.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 (!_chunkPL62CCCKjs.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 -D playwright-chromium`");
|
|
67
67
|
const pages = _core.parseRangeString.call(void 0, total, range);
|
|
68
68
|
const { chromium } = await Promise.resolve().then(() => _chunkIXNT7VMKjs.__toESM.call(void 0, _chunkIXNT7VMKjs.__require.call(void 0, "playwright-chromium")));
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCIB2BRE3js = require('./chunk-CIB2BRE3.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -9,11 +9,11 @@ var _chunkE4IOOAKNjs = require('./chunk-E4IOOAKN.js');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkPL62CCCKjs = require('./chunk-PL62CCCK.js');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkRBYAPROQjs = require('./chunk-RBYAPROQ.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkIXNT7VMKjs = require('./chunk-IXNT7VMK.js');
|
|
@@ -34,4 +34,4 @@ _chunkIXNT7VMKjs.init_cjs_shims.call(void 0, );
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
exports.ViteSlidevPlugin =
|
|
37
|
+
exports.ViteSlidevPlugin = _chunkRBYAPROQjs.ViteSlidevPlugin; exports.createServer = _chunkCIB2BRE3js.createServer; exports.createWindiCSSPlugin = _chunkRBYAPROQjs.createWindiCSSPlugin; exports.getCLIRoot = _chunkPL62CCCKjs.getCLIRoot; exports.getClientRoot = _chunkPL62CCCKjs.getClientRoot; exports.getThemeRoots = _chunkPL62CCCKjs.getThemeRoots; exports.getUserRoot = _chunkPL62CCCKjs.getUserRoot; exports.isPath = _chunkPL62CCCKjs.isPath; exports.parser = _chunkPL62CCCKjs.fs_exports; exports.resolveOptions = _chunkPL62CCCKjs.resolveOptions;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LCOJZNZW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
fs_exports,
|
|
6
6
|
getCLIRoot,
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
getUserRoot,
|
|
10
10
|
isPath,
|
|
11
11
|
resolveOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-42RALHAU.mjs";
|
|
13
13
|
import {
|
|
14
14
|
ViteSlidevPlugin,
|
|
15
15
|
createWindiCSSPlugin
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-4YPIBI4G.mjs";
|
|
17
17
|
import {
|
|
18
18
|
init_esm_shims
|
|
19
19
|
} from "./chunk-XMETW2MS.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.3",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"homepage": "https://sli.dev",
|
|
6
6
|
"bugs": "https://github.com/slidevjs/slidev/issues",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"@antfu/utils": "^0.5.1",
|
|
43
43
|
"@iconify-json/carbon": "^1.1.3",
|
|
44
44
|
"@iconify-json/ph": "^1.1.1",
|
|
45
|
-
"@slidev/client": "0.30.
|
|
46
|
-
"@slidev/parser": "0.30.
|
|
47
|
-
"@slidev/types": "0.30.
|
|
45
|
+
"@slidev/client": "0.30.3",
|
|
46
|
+
"@slidev/parser": "0.30.3",
|
|
47
|
+
"@slidev/types": "0.30.3",
|
|
48
48
|
"@vitejs/plugin-vue": "^2.3.1",
|
|
49
49
|
"@vue/compiler-sfc": "^3.2.32",
|
|
50
50
|
"cli-progress": "^3.10.0",
|