@slidev/cli 0.36.8 → 0.36.9

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.
@@ -2450,7 +2450,7 @@ _chunkN6L4BUFDjs.init_cjs_shims.call(void 0, );
2450
2450
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2451
2451
 
2452
2452
  // package.json
2453
- var version = "0.36.8";
2453
+ var version = "0.36.9";
2454
2454
 
2455
2455
  // node/themes.ts
2456
2456
  _chunkN6L4BUFDjs.init_cjs_shims.call(void 0, );
@@ -2451,7 +2451,7 @@ init_esm_shims();
2451
2451
  import * as parser from "@slidev/parser/fs";
2452
2452
 
2453
2453
  // package.json
2454
- var version = "0.36.8";
2454
+ var version = "0.36.9";
2455
2455
 
2456
2456
  // node/themes.ts
2457
2457
  init_esm_shims();
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkT7KA74KVjs = require('./chunk-T7KA74KV.js');
9
+ var _chunkAOK6JXBQjs = require('./chunk-AOK6JXBQ.js');
10
10
 
11
11
 
12
12
  var _chunk2IBHRHAWjs = require('./chunk-2IBHRHAW.js');
@@ -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(_chunkT7KA74KVjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
41
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkAOK6JXBQjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
42
42
  cli.command(
43
43
  "* [entry]",
44
44
  "Start a local server for Slidev",
@@ -89,9 +89,9 @@ cli.command(
89
89
  async function initServer() {
90
90
  if (server)
91
91
  await server.close();
92
- const options = await _chunkT7KA74KVjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
92
+ const options = await _chunkAOK6JXBQjs.resolveOptions.call(void 0, { entry, remote, theme, inspect }, "dev");
93
93
  port = userPort || await findFreePort(3030);
94
- server = await _chunkT7KA74KVjs.createServer.call(void 0,
94
+ server = await _chunkAOK6JXBQjs.createServer.call(void 0,
95
95
  options,
96
96
  {
97
97
  server: {
@@ -105,7 +105,7 @@ cli.command(
105
105
  },
106
106
  {
107
107
  onDataReload(newData, data) {
108
- if (!theme && _chunkT7KA74KVjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkT7KA74KVjs.resolveThemeName.call(void 0, data.config.theme)) {
108
+ if (!theme && _chunkAOK6JXBQjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkAOK6JXBQjs.resolveThemeName.call(void 0, data.config.theme)) {
109
109
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
110
110
  initServer();
111
111
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -192,7 +192,7 @@ cli.command(
192
192
  }).strict().help(),
193
193
  async ({ entry, theme, watch, base, download, out, inspect }) => {
194
194
  const { build } = await Promise.resolve().then(() => _chunkN6L4BUFDjs.__toESM.call(void 0, _chunkN6L4BUFDjs.__require.call(void 0, "./build-GTIHOK2D.js")));
195
- const options = await _chunkT7KA74KVjs.resolveOptions.call(void 0, { entry, theme, inspect }, "build");
195
+ const options = await _chunkAOK6JXBQjs.resolveOptions.call(void 0, { entry, theme, inspect }, "build");
196
196
  if (download && !options.data.config.download)
197
197
  options.data.config.download = download;
198
198
  printInfo(options);
@@ -210,9 +210,9 @@ cli.command(
210
210
  "Format the markdown file",
211
211
  (args) => commonOptions(args).strict().help(),
212
212
  async ({ entry }) => {
213
- const data = await _chunkT7KA74KVjs.parser.load(entry);
214
- _chunkT7KA74KVjs.parser.prettify(data);
215
- await _chunkT7KA74KVjs.parser.save(data);
213
+ const data = await _chunkAOK6JXBQjs.parser.load(entry);
214
+ _chunkAOK6JXBQjs.parser.prettify(data);
215
+ await _chunkAOK6JXBQjs.parser.save(data);
216
216
  }
217
217
  );
218
218
  cli.command(
@@ -227,17 +227,17 @@ cli.command(
227
227
  default: "theme"
228
228
  }),
229
229
  async ({ entry, dir, theme: themeInput }) => {
230
- const data = await _chunkT7KA74KVjs.parser.load(entry);
231
- const theme = _chunkT7KA74KVjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
230
+ const data = await _chunkAOK6JXBQjs.parser.load(entry);
231
+ const theme = _chunkAOK6JXBQjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
232
232
  if (theme === "none") {
233
233
  console.error('Can not eject theme "none"');
234
234
  process.exit(1);
235
235
  }
236
- if (_chunkT7KA74KVjs.isPath.call(void 0, theme)) {
236
+ if (_chunkAOK6JXBQjs.isPath.call(void 0, theme)) {
237
237
  console.error("Theme is already ejected");
238
238
  process.exit(1);
239
239
  }
240
- const roots = _chunkT7KA74KVjs.getThemeRoots.call(void 0, theme, entry);
240
+ const roots = _chunkAOK6JXBQjs.getThemeRoots.call(void 0, theme, entry);
241
241
  if (!roots.length) {
242
242
  console.error(`Does not found theme "${theme}"`);
243
243
  process.exit(1);
@@ -249,7 +249,7 @@ cli.command(
249
249
  const dirPath = `./${dir}`;
250
250
  data.slides[0].frontmatter.theme = dirPath;
251
251
  data.slides[0].raw = null;
252
- await _chunkT7KA74KVjs.parser.save(data);
252
+ await _chunkAOK6JXBQjs.parser.save(data);
253
253
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
254
254
  }
255
255
  );
@@ -304,9 +304,9 @@ cli.command(
304
304
  process.env.NODE_ENV = "production";
305
305
  const { exportSlides } = await Promise.resolve().then(() => _chunkN6L4BUFDjs.__toESM.call(void 0, _chunkN6L4BUFDjs.__require.call(void 0, "./export-TNU37SL5.js")));
306
306
  const port = await findFreePort(12445);
307
- const options = await _chunkT7KA74KVjs.resolveOptions.call(void 0, { entry, theme }, "build");
307
+ const options = await _chunkAOK6JXBQjs.resolveOptions.call(void 0, { entry, theme }, "build");
308
308
  output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
309
- const server = await _chunkT7KA74KVjs.createServer.call(void 0,
309
+ const server = await _chunkAOK6JXBQjs.createServer.call(void 0,
310
310
  options,
311
311
  {
312
312
  server: { port },
@@ -315,7 +315,7 @@ cli.command(
315
315
  );
316
316
  await server.listen(port);
317
317
  printInfo(options);
318
- _chunkT7KA74KVjs.parser.filterDisabled(options.data);
318
+ _chunkAOK6JXBQjs.parser.filterDisabled(options.data);
319
319
  const width = options.data.config.canvasWidth;
320
320
  const height = Math.round(width / options.data.config.aspectRatio);
321
321
  output = await exportSlides({
@@ -357,10 +357,10 @@ cli.command(
357
357
  process.env.NODE_ENV = "production";
358
358
  const { exportNotes } = await Promise.resolve().then(() => _chunkN6L4BUFDjs.__toESM.call(void 0, _chunkN6L4BUFDjs.__require.call(void 0, "./export-TNU37SL5.js")));
359
359
  const port = await findFreePort(12445);
360
- const options = await _chunkT7KA74KVjs.resolveOptions.call(void 0, { entry }, "build");
360
+ const options = await _chunkAOK6JXBQjs.resolveOptions.call(void 0, { entry }, "build");
361
361
  if (!output)
362
362
  output = options.data.config.exportFilename ? `${options.data.config.exportFilename}-notes` : `${_path2.default.basename(entry, ".md")}-export-notes`;
363
- const server = await _chunkT7KA74KVjs.createServer.call(void 0,
363
+ const server = await _chunkAOK6JXBQjs.createServer.call(void 0,
364
364
  options,
365
365
  {
366
366
  server: { port },
@@ -369,7 +369,7 @@ cli.command(
369
369
  );
370
370
  await server.listen(port);
371
371
  printInfo(options);
372
- _chunkT7KA74KVjs.parser.filterDisabled(options.data);
372
+ _chunkAOK6JXBQjs.parser.filterDisabled(options.data);
373
373
  output = await exportNotes({
374
374
  port,
375
375
  output
@@ -396,7 +396,7 @@ function printInfo(options, port, remote) {
396
396
  console.log();
397
397
  console.log();
398
398
  console.log(` ${_kolorist.cyan.call(void 0, "\u25CF") + _kolorist.blue.call(void 0, "\u25A0") + _kolorist.yellow.call(void 0, "\u25B2")}`);
399
- console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkT7KA74KVjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
399
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkAOK6JXBQjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
400
400
  console.log();
401
401
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
402
402
  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,7 +6,7 @@ import {
6
6
  resolveOptions,
7
7
  resolveThemeName,
8
8
  version
9
- } from "./chunk-IZV3E77H.mjs";
9
+ } from "./chunk-VKCHH4EN.mjs";
10
10
  import {
11
11
  require_fast_deep_equal
12
12
  } from "./chunk-GHZ56E2R.mjs";
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
 
11
11
 
12
- var _chunkT7KA74KVjs = require('./chunk-T7KA74KV.js');
12
+ var _chunkAOK6JXBQjs = require('./chunk-AOK6JXBQ.js');
13
13
 
14
14
 
15
15
 
@@ -36,4 +36,4 @@ _chunkN6L4BUFDjs.init_cjs_shims.call(void 0, );
36
36
 
37
37
 
38
38
 
39
- exports.ViteSlidevPlugin = _chunk2IBHRHAWjs.ViteSlidevPlugin; exports.createServer = _chunkT7KA74KVjs.createServer; exports.createWindiCSSPlugin = _chunk2IBHRHAWjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkT7KA74KVjs.getAddonRoots; exports.getCLIRoot = _chunkT7KA74KVjs.getCLIRoot; exports.getClientRoot = _chunkT7KA74KVjs.getClientRoot; exports.getRoot = _chunkT7KA74KVjs.getRoot; exports.getThemeRoots = _chunkT7KA74KVjs.getThemeRoots; exports.getUserRoot = _chunkT7KA74KVjs.getUserRoot; exports.isPath = _chunkT7KA74KVjs.isPath; exports.parser = _chunkT7KA74KVjs.parser; exports.resolveOptions = _chunkT7KA74KVjs.resolveOptions;
39
+ exports.ViteSlidevPlugin = _chunk2IBHRHAWjs.ViteSlidevPlugin; exports.createServer = _chunkAOK6JXBQjs.createServer; exports.createWindiCSSPlugin = _chunk2IBHRHAWjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkAOK6JXBQjs.getAddonRoots; exports.getCLIRoot = _chunkAOK6JXBQjs.getCLIRoot; exports.getClientRoot = _chunkAOK6JXBQjs.getClientRoot; exports.getRoot = _chunkAOK6JXBQjs.getRoot; exports.getThemeRoots = _chunkAOK6JXBQjs.getThemeRoots; exports.getUserRoot = _chunkAOK6JXBQjs.getUserRoot; exports.isPath = _chunkAOK6JXBQjs.isPath; exports.parser = _chunkAOK6JXBQjs.parser; exports.resolveOptions = _chunkAOK6JXBQjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-IZV3E77H.mjs";
12
+ } from "./chunk-VKCHH4EN.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.36.8",
3
+ "version": "0.36.9",
4
4
  "description": "Presentation slides for developers",
5
5
  "author": "antfu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -46,9 +46,9 @@
46
46
  "@hedgedoc/markdown-it-task-lists": "^1.0.5",
47
47
  "@iconify-json/carbon": "^1.1.8",
48
48
  "@iconify-json/ph": "^1.1.2",
49
- "@slidev/client": "0.36.8",
50
- "@slidev/parser": "0.36.8",
51
- "@slidev/types": "0.36.8",
49
+ "@slidev/client": "0.36.9",
50
+ "@slidev/parser": "0.36.9",
51
+ "@slidev/types": "0.36.9",
52
52
  "@vitejs/plugin-vue": "^3.1.2",
53
53
  "cli-progress": "^3.11.2",
54
54
  "codemirror": "^5.65.5",