@slidev/cli 0.31.4 → 0.32.1

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.
@@ -147,6 +147,12 @@ function generateGoogleFontsUrl(options) {
147
147
  const fonts = options.webfonts.map((i) => `family=${i.replace(/^(['"])(.*)\1$/, "$1").replace(/\s+/g, "+")}:${options.italic ? "ital," : ""}wght@${weights}`).join("&");
148
148
  return `https://fonts.googleapis.com/css2?${fonts}&display=swap`;
149
149
  }
150
+ function packageExists(name) {
151
+ if (resolveImportPath(`${name}/package.json`))
152
+ return true;
153
+ return false;
154
+ }
155
+
150
156
 
151
157
 
152
158
 
@@ -165,4 +171,4 @@ function generateGoogleFontsUrl(options) {
165
171
 
166
172
 
167
173
 
168
- exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__require = __require; exports.__objRest = __objRest; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.init_cjs_shims = init_cjs_shims; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl;
174
+ exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__require = __require; exports.__objRest = __objRest; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.init_cjs_shims = init_cjs_shims; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl; exports.packageExists = packageExists;
@@ -154,6 +154,11 @@ function generateGoogleFontsUrl(options) {
154
154
  const fonts = options.webfonts.map((i) => `family=${i.replace(/^(['"])(.*)\1$/, "$1").replace(/\s+/g, "+")}:${options.italic ? "ital," : ""}wght@${weights}`).join("&");
155
155
  return `https://fonts.googleapis.com/css2?${fonts}&display=swap`;
156
156
  }
157
+ function packageExists(name) {
158
+ if (resolveImportPath(`${name}/package.json`))
159
+ return true;
160
+ return false;
161
+ }
157
162
 
158
163
  export {
159
164
  __spreadValues,
@@ -173,5 +178,6 @@ export {
173
178
  resolveImportPath,
174
179
  resolveGlobalImportPath,
175
180
  stringifyMarkdownTokens,
176
- generateGoogleFontsUrl
181
+ generateGoogleFontsUrl,
182
+ packageExists
177
183
  };
package/dist/cli.js CHANGED
@@ -1,26 +1,24 @@
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 _chunk6FP4S4BJjs = require('./chunk-6FP4S4BJ.js');
4
3
 
5
4
 
6
5
 
7
6
 
8
7
 
9
8
 
9
+ var _chunkALT27UGEjs = require('./chunk-ALT27UGE.js');
10
10
 
11
- var _chunkVNV7XQUUjs = require('./chunk-VNV7XQUU.js');
12
11
 
12
+ var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
13
13
 
14
- var _chunkRQ7QDWD6js = require('./chunk-RQ7QDWD6.js');
15
14
 
16
15
 
17
16
 
18
-
19
- var _chunkOYCSUJS7js = require('./chunk-OYCSUJS7.js');
17
+ var _chunkJWGORJY6js = require('./chunk-JWGORJY6.js');
20
18
 
21
19
  // node/cli.ts
22
- _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
23
- var import_fast_deep_equal = _chunkOYCSUJS7js.__toESM.call(void 0, _chunkRQ7QDWD6js.require_fast_deep_equal.call(void 0, ));
20
+ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
21
+ var import_fast_deep_equal = _chunkJWGORJY6js.__toESM.call(void 0, _chunk64ARPHPAjs.require_fast_deep_equal.call(void 0, ));
24
22
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
25
23
  var _net = require('net'); var _net2 = _interopRequireDefault(_net);
26
24
  var _os = require('os'); var _os2 = _interopRequireDefault(_os);
@@ -38,7 +36,7 @@ var CONFIG_RESTART_FIELDS = [
38
36
  "routerMode",
39
37
  "fonts"
40
38
  ];
41
- var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkVNV7XQUUjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
39
+ var cli = _yargs2.default.scriptName("slidev").usage("$0 [args]").version(_chunkALT27UGEjs.version).strict().showHelpOnFail(false).alias("h", "help").alias("v", "version");
42
40
  cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOptions(args).option("port", {
43
41
  alias: "p",
44
42
  type: "number",
@@ -81,9 +79,9 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
81
79
  async function initServer() {
82
80
  if (server)
83
81
  await server.close();
84
- const options = await _chunkVNV7XQUUjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
82
+ const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, remote, theme }, "dev");
85
83
  port = userPort || await findFreePort(3030);
86
- server = await _chunk6FP4S4BJjs.createServer.call(void 0, options, {
84
+ server = await _chunkALT27UGEjs.createServer.call(void 0, options, {
87
85
  server: {
88
86
  port,
89
87
  strictPort: true,
@@ -94,7 +92,7 @@ cli.command("* [entry]", "Start a local server for Slidev", (args) => commonOpti
94
92
  logLevel: log
95
93
  }, {
96
94
  onDataReload(newData, data) {
97
- if (!theme && _chunkVNV7XQUUjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkVNV7XQUUjs.resolveThemeName.call(void 0, data.config.theme)) {
95
+ if (!theme && _chunkALT27UGEjs.resolveThemeName.call(void 0, newData.config.theme) !== _chunkALT27UGEjs.resolveThemeName.call(void 0, data.config.theme)) {
98
96
  console.log(_kolorist.yellow.call(void 0, "\n restarting on theme change\n"));
99
97
  initServer();
100
98
  } else if (CONFIG_RESTART_FIELDS.some((i) => !(0, import_fast_deep_equal.default)(newData.config[i], data.config[i]))) {
@@ -170,8 +168,8 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
170
168
  type: "boolean",
171
169
  describe: "allow download as PDF"
172
170
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
173
- const { build } = await Promise.resolve().then(() => _chunkOYCSUJS7js.__toESM.call(void 0, _chunkOYCSUJS7js.__require.call(void 0, "./build-5QYEFLVL.js")));
174
- const options = await _chunkVNV7XQUUjs.resolveOptions.call(void 0, { entry, theme }, "build");
171
+ const { build } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "./build-OV5R3MX7.js")));
172
+ const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, theme }, "build");
175
173
  if (download && !options.data.config.download)
176
174
  options.data.config.download = download;
177
175
  printInfo(options);
@@ -184,26 +182,26 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
184
182
  });
185
183
  });
186
184
  cli.command("format [entry]", "Format the markdown file", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
187
- const data = await _chunkVNV7XQUUjs.parser.load(entry);
188
- _chunkVNV7XQUUjs.parser.prettify(data);
189
- await _chunkVNV7XQUUjs.parser.save(data);
185
+ const data = await _chunkALT27UGEjs.parser.load(entry);
186
+ _chunkALT27UGEjs.parser.prettify(data);
187
+ await _chunkALT27UGEjs.parser.save(data);
190
188
  });
191
189
  cli.command("theme [subcommand]", "Theme related operations", (command) => {
192
190
  return command.command("eject", "Eject current theme into local file system", (args) => commonOptions(args).option("dir", {
193
191
  type: "string",
194
192
  default: "theme"
195
193
  }), async ({ entry, dir, theme: themeInput }) => {
196
- const data = await _chunkVNV7XQUUjs.parser.load(entry);
197
- const theme = _chunkVNV7XQUUjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
194
+ const data = await _chunkALT27UGEjs.parser.load(entry);
195
+ const theme = _chunkALT27UGEjs.resolveThemeName.call(void 0, themeInput || data.config.theme);
198
196
  if (theme === "none") {
199
197
  console.error('Can not eject theme "none"');
200
198
  process.exit(1);
201
199
  }
202
- if (_chunkVNV7XQUUjs.isPath.call(void 0, theme)) {
200
+ if (_chunkALT27UGEjs.isPath.call(void 0, theme)) {
203
201
  console.error("Theme is already ejected");
204
202
  process.exit(1);
205
203
  }
206
- const roots = _chunkVNV7XQUUjs.getThemeRoots.call(void 0, theme, entry);
204
+ const roots = _chunkALT27UGEjs.getThemeRoots.call(void 0, theme, entry);
207
205
  if (!roots.length) {
208
206
  console.error(`Does not found theme "${theme}"`);
209
207
  process.exit(1);
@@ -215,7 +213,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
215
213
  const dirPath = `./${dir}`;
216
214
  data.slides[0].frontmatter.theme = dirPath;
217
215
  data.slides[0].raw = null;
218
- await _chunkVNV7XQUUjs.parser.save(data);
216
+ await _chunkALT27UGEjs.parser.save(data);
219
217
  console.log(`Theme "${theme}" ejected successfully to "${dirPath}"`);
220
218
  });
221
219
  }, () => {
@@ -224,7 +222,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
224
222
  });
225
223
  cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(args).option("output", {
226
224
  type: "string",
227
- describe: "path to the the port output"
225
+ describe: "path to the output"
228
226
  }).option("format", {
229
227
  default: "pdf",
230
228
  type: "string",
@@ -257,17 +255,17 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
257
255
  "with-clicks": withClicks
258
256
  }) => {
259
257
  process.env.NODE_ENV = "production";
260
- const { exportSlides } = await Promise.resolve().then(() => _chunkOYCSUJS7js.__toESM.call(void 0, _chunkOYCSUJS7js.__require.call(void 0, "./export-W52T2VBO.js")));
258
+ const { exportSlides } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "./export-M6HJUIFY.js")));
261
259
  const port = await findFreePort(12445);
262
- const options = await _chunkVNV7XQUUjs.resolveOptions.call(void 0, { entry, theme }, "build");
260
+ const options = await _chunkALT27UGEjs.resolveOptions.call(void 0, { entry, theme }, "build");
263
261
  output = output || options.data.config.exportFilename || `${_path2.default.basename(entry, ".md")}-export`;
264
- const server = await _chunk6FP4S4BJjs.createServer.call(void 0, options, {
262
+ const server = await _chunkALT27UGEjs.createServer.call(void 0, options, {
265
263
  server: { port },
266
264
  clearScreen: false
267
265
  });
268
266
  await server.listen(port);
269
267
  printInfo(options);
270
- _chunkVNV7XQUUjs.parser.filterDisabled(options.data);
268
+ _chunkALT27UGEjs.parser.filterDisabled(options.data);
271
269
  const width = options.data.config.canvasWidth;
272
270
  const height = Math.round(width / options.data.config.aspectRatio);
273
271
  output = await exportSlides({
@@ -305,7 +303,7 @@ function printInfo(options, port, remote) {
305
303
  console.log();
306
304
  console.log();
307
305
  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${_chunkVNV7XQUUjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
306
+ console.log(`${_kolorist.bold.call(void 0, " Slidev")} ${_kolorist.blue.call(void 0, `v${_chunkALT27UGEjs.version}`)} ${_isinstalledglobally2.default ? _kolorist.yellow.call(void 0, "(global)") : ""}`);
309
307
  console.log();
310
308
  console.log(_kolorist.dim.call(void 0, " theme ") + (options.theme ? _kolorist.green.call(void 0, options.theme) : _kolorist.gray.call(void 0, "none")));
311
309
  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,23 +1,21 @@
1
1
  import {
2
- createServer
3
- } from "./chunk-A6EFYWHQ.mjs";
4
- import {
2
+ createServer,
5
3
  getThemeRoots,
6
4
  isPath,
7
5
  parser,
8
6
  resolveOptions,
9
7
  resolveThemeName,
10
8
  version
11
- } from "./chunk-7HNXF4RI.mjs";
9
+ } from "./chunk-36AQIIEM.mjs";
12
10
  import {
13
11
  require_fast_deep_equal
14
- } from "./chunk-NKDK3BW7.mjs";
12
+ } from "./chunk-2OKC6HYP.mjs";
15
13
  import {
16
14
  __dirname,
17
15
  __require,
18
16
  __toESM,
19
17
  init_esm_shims
20
- } from "./chunk-25USV2L5.mjs";
18
+ } from "./chunk-NOFZO6W4.mjs";
21
19
 
22
20
  // node/cli.ts
23
21
  init_esm_shims();
@@ -171,7 +169,7 @@ cli.command("build [entry]", "Build hostable SPA", (args) => commonOptions(args)
171
169
  type: "boolean",
172
170
  describe: "allow download as PDF"
173
171
  }).strict().help(), async ({ entry, theme, watch, base, download, out }) => {
174
- const { build } = await Promise.resolve().then(() => __toESM(__require("./build-QLCAUS73.mjs")));
172
+ const { build } = await Promise.resolve().then(() => __toESM(__require("./build-RKDPZPJ4.mjs")));
175
173
  const options = await resolveOptions({ entry, theme }, "build");
176
174
  if (download && !options.data.config.download)
177
175
  options.data.config.download = download;
@@ -225,7 +223,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
225
223
  });
226
224
  cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(args).option("output", {
227
225
  type: "string",
228
- describe: "path to the the port output"
226
+ describe: "path to the output"
229
227
  }).option("format", {
230
228
  default: "pdf",
231
229
  type: "string",
@@ -258,7 +256,7 @@ cli.command("export [entry]", "Export slides to PDF", (args) => commonOptions(ar
258
256
  "with-clicks": withClicks
259
257
  }) => {
260
258
  process.env.NODE_ENV = "production";
261
- const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-RFA6N32W.mjs")));
259
+ const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-GIPHUNUX.mjs")));
262
260
  const port = await findFreePort(12445);
263
261
  const options = await resolveOptions({ entry, theme }, "build");
264
262
  output = output || options.data.config.exportFilename || `${path.basename(entry, ".md")}-export`;
@@ -1,11 +1,9 @@
1
- import {
2
- packageExists
3
- } from "./chunk-7HNXF4RI.mjs";
4
1
  import {
5
2
  __require,
6
3
  __toESM,
7
- init_esm_shims
8
- } from "./chunk-25USV2L5.mjs";
4
+ init_esm_shims,
5
+ packageExists
6
+ } from "./chunk-NOFZO6W4.mjs";
9
7
 
10
8
  // node/export.ts
11
9
  init_esm_shims();
@@ -1,14 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
2
 
3
- var _chunkVNV7XQUUjs = require('./chunk-VNV7XQUU.js');
4
3
 
5
4
 
6
5
 
7
-
8
- var _chunkOYCSUJS7js = require('./chunk-OYCSUJS7.js');
6
+ var _chunkJWGORJY6js = require('./chunk-JWGORJY6.js');
9
7
 
10
8
  // node/export.ts
11
- _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
9
+ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
12
10
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
13
11
  var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
14
12
  var _kolorist = require('kolorist');
@@ -62,10 +60,10 @@ async function exportSlides({
62
60
  height = 1080,
63
61
  withClicks = false
64
62
  }) {
65
- if (!_chunkVNV7XQUUjs.packageExists.call(void 0, "playwright-chromium"))
63
+ if (!_chunkJWGORJY6js.packageExists.call(void 0, "playwright-chromium"))
66
64
  throw new Error("The exporting for Slidev is powered by Playwright, please installed it via `npm i -D playwright-chromium`");
67
65
  const pages = _core.parseRangeString.call(void 0, total, range);
68
- const { chromium } = await Promise.resolve().then(() => _chunkOYCSUJS7js.__toESM.call(void 0, _chunkOYCSUJS7js.__require.call(void 0, "playwright-chromium")));
66
+ const { chromium } = await Promise.resolve().then(() => _chunkJWGORJY6js.__toESM.call(void 0, _chunkJWGORJY6js.__require.call(void 0, "playwright-chromium")));
69
67
  const browser = await chromium.launch();
70
68
  const context = await browser.newContext({
71
69
  viewport: {
package/dist/index.d.ts CHANGED
@@ -42,6 +42,7 @@ interface ResolvedSlidevOptions {
42
42
  clientRoot: string;
43
43
  theme: string;
44
44
  themeRoots: string[];
45
+ addonRoots: string[];
45
46
  roots: string[];
46
47
  mode: 'dev' | 'build';
47
48
  remote?: string;
@@ -62,6 +63,8 @@ declare function getClientRoot(): string;
62
63
  declare function getCLIRoot(): string;
63
64
  declare function isPath(name: string): boolean;
64
65
  declare function getThemeRoots(name: string, entry: string): string[];
66
+ declare function getAddonRoots(addons: string[], entry: string): string[];
67
+ declare function getRoot(name: string, entry: string): string;
65
68
  declare function getUserRoot(options: SlidevEntryOptions): {
66
69
  entry: string;
67
70
  userRoot: string;
@@ -83,6 +86,6 @@ declare function createServer(options: ResolvedSlidevOptions, viteConfig?: Inlin
83
86
 
84
87
  declare function ViteSlidevPlugin(options: ResolvedSlidevOptions, pluginOptions: SlidevPluginOptions, serverOptions?: SlidevServerOptions): Promise<Plugin[]>;
85
88
 
86
- declare function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, data }: ResolvedSlidevOptions, { windicss: windiOptions }: SlidevPluginOptions): Promise<vite.Plugin[]>;
89
+ declare function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }: ResolvedSlidevOptions, { windicss: windiOptions }: SlidevPluginOptions): Promise<vite.Plugin[]>;
87
90
 
88
- export { ResolvedSlidevOptions, SlidevEntryOptions, SlidevPluginOptions, SlidevServerOptions, ViteSlidevPlugin, createServer, createWindiCSSPlugin, getCLIRoot, getClientRoot, getThemeRoots, getUserRoot, isPath, resolveOptions };
91
+ export { ResolvedSlidevOptions, SlidevEntryOptions, SlidevPluginOptions, SlidevServerOptions, ViteSlidevPlugin, createServer, createWindiCSSPlugin, getAddonRoots, getCLIRoot, getClientRoot, getRoot, getThemeRoots, getUserRoot, isPath, resolveOptions };
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk6FP4S4BJjs = require('./chunk-6FP4S4BJ.js');
4
3
 
5
4
 
6
5
 
@@ -9,20 +8,23 @@ var _chunk6FP4S4BJjs = require('./chunk-6FP4S4BJ.js');
9
8
 
10
9
 
11
10
 
12
- var _chunkVNV7XQUUjs = require('./chunk-VNV7XQUU.js');
13
11
 
12
+ var _chunkALT27UGEjs = require('./chunk-ALT27UGE.js');
14
13
 
15
14
 
16
- var _chunkRQ7QDWD6js = require('./chunk-RQ7QDWD6.js');
17
15
 
16
+ var _chunk64ARPHPAjs = require('./chunk-64ARPHPA.js');
18
17
 
19
- var _chunkOYCSUJS7js = require('./chunk-OYCSUJS7.js');
18
+
19
+ var _chunkJWGORJY6js = require('./chunk-JWGORJY6.js');
20
20
 
21
21
  // node/index.ts
22
- _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
22
+ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
23
23
 
24
24
  // node/declare.ts
25
- _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
25
+ _chunkJWGORJY6js.init_cjs_shims.call(void 0, );
26
+
27
+
26
28
 
27
29
 
28
30
 
@@ -34,4 +36,4 @@ _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
34
36
 
35
37
 
36
38
 
37
- exports.ViteSlidevPlugin = _chunkRQ7QDWD6js.ViteSlidevPlugin; exports.createServer = _chunk6FP4S4BJjs.createServer; exports.createWindiCSSPlugin = _chunkRQ7QDWD6js.createWindiCSSPlugin; exports.getCLIRoot = _chunkVNV7XQUUjs.getCLIRoot; exports.getClientRoot = _chunkVNV7XQUUjs.getClientRoot; exports.getThemeRoots = _chunkVNV7XQUUjs.getThemeRoots; exports.getUserRoot = _chunkVNV7XQUUjs.getUserRoot; exports.isPath = _chunkVNV7XQUUjs.isPath; exports.parser = _chunkVNV7XQUUjs.parser; exports.resolveOptions = _chunkVNV7XQUUjs.resolveOptions;
39
+ exports.ViteSlidevPlugin = _chunk64ARPHPAjs.ViteSlidevPlugin; exports.createServer = _chunkALT27UGEjs.createServer; exports.createWindiCSSPlugin = _chunk64ARPHPAjs.createWindiCSSPlugin; exports.getAddonRoots = _chunkALT27UGEjs.getAddonRoots; exports.getCLIRoot = _chunkALT27UGEjs.getCLIRoot; exports.getClientRoot = _chunkALT27UGEjs.getClientRoot; exports.getRoot = _chunkALT27UGEjs.getRoot; exports.getThemeRoots = _chunkALT27UGEjs.getThemeRoots; exports.getUserRoot = _chunkALT27UGEjs.getUserRoot; exports.isPath = _chunkALT27UGEjs.isPath; exports.parser = _chunkALT27UGEjs.parser; exports.resolveOptions = _chunkALT27UGEjs.resolveOptions;
package/dist/index.mjs CHANGED
@@ -1,22 +1,22 @@
1
1
  import {
2
- createServer
3
- } from "./chunk-A6EFYWHQ.mjs";
4
- import {
2
+ createServer,
3
+ getAddonRoots,
5
4
  getCLIRoot,
6
5
  getClientRoot,
6
+ getRoot,
7
7
  getThemeRoots,
8
8
  getUserRoot,
9
9
  isPath,
10
10
  parser,
11
11
  resolveOptions
12
- } from "./chunk-7HNXF4RI.mjs";
12
+ } from "./chunk-36AQIIEM.mjs";
13
13
  import {
14
14
  ViteSlidevPlugin,
15
15
  createWindiCSSPlugin
16
- } from "./chunk-NKDK3BW7.mjs";
16
+ } from "./chunk-2OKC6HYP.mjs";
17
17
  import {
18
18
  init_esm_shims
19
- } from "./chunk-25USV2L5.mjs";
19
+ } from "./chunk-NOFZO6W4.mjs";
20
20
 
21
21
  // node/index.ts
22
22
  init_esm_shims();
@@ -27,8 +27,10 @@ export {
27
27
  ViteSlidevPlugin,
28
28
  createServer,
29
29
  createWindiCSSPlugin,
30
+ getAddonRoots,
30
31
  getCLIRoot,
31
32
  getClientRoot,
33
+ getRoot,
32
34
  getThemeRoots,
33
35
  getUserRoot,
34
36
  isPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.31.4",
3
+ "version": "0.32.1",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -40,14 +40,14 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@antfu/utils": "^0.5.2",
43
- "@iconify-json/carbon": "^1.1.4",
43
+ "@iconify-json/carbon": "^1.1.5",
44
44
  "@iconify-json/ph": "^1.1.1",
45
- "@slidev/client": "0.31.4",
46
- "@slidev/parser": "0.31.4",
47
- "@slidev/types": "0.31.4",
45
+ "@slidev/client": "0.32.1",
46
+ "@slidev/parser": "0.32.1",
47
+ "@slidev/types": "0.32.1",
48
48
  "@vitejs/plugin-vue": "^2.3.3",
49
- "@vue/compiler-sfc": "^3.2.33",
50
- "cli-progress": "^3.11.0",
49
+ "@vue/compiler-sfc": "^3.2.34",
50
+ "cli-progress": "^3.11.1",
51
51
  "codemirror": "^5.65.3",
52
52
  "connect": "^3.7.0",
53
53
  "debug": "^4.3.4",
@@ -80,9 +80,9 @@
80
80
  "vite-plugin-remote-assets": "^0.2.2",
81
81
  "vite-plugin-vue-server-ref": "^0.2.4",
82
82
  "vite-plugin-windicss": "^1.8.4",
83
- "vue": "^3.2.33",
84
- "windicss": "^3.5.3",
85
- "yargs": "^17.5.0"
83
+ "vue": "^3.2.34",
84
+ "windicss": "^3.5.4",
85
+ "yargs": "^17.5.1"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@types/plantuml-encoder": "^1.4.0",
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkRQ7QDWD6js = require('./chunk-RQ7QDWD6.js');
4
-
5
-
6
- var _chunkOYCSUJS7js = require('./chunk-OYCSUJS7.js');
7
-
8
- // node/server.ts
9
- _chunkOYCSUJS7js.init_cjs_shims.call(void 0, );
10
- var _path = require('path');
11
- var _vite = require('vite');
12
- async function createServer(options, viteConfig = {}, serverOptions = {}) {
13
- const rawConfig = await _vite.resolveConfig.call(void 0, {}, "serve");
14
- const pluginOptions = rawConfig.slidev || {};
15
- process.env.EDITOR = process.env.EDITOR || "code";
16
- const server = await _vite.createServer.call(void 0, _vite.mergeConfig.call(void 0, viteConfig, {
17
- optimizeDeps: {
18
- entries: [
19
- _path.join.call(void 0, options.clientRoot, "main.ts")
20
- ]
21
- },
22
- plugins: [
23
- await _chunkRQ7QDWD6js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
24
- ]
25
- }));
26
- return server;
27
- }
28
-
29
-
30
-
31
- exports.createServer = createServer;
@@ -1,31 +0,0 @@
1
- import {
2
- ViteSlidevPlugin
3
- } from "./chunk-NKDK3BW7.mjs";
4
- import {
5
- init_esm_shims
6
- } from "./chunk-25USV2L5.mjs";
7
-
8
- // node/server.ts
9
- init_esm_shims();
10
- import { join } from "path";
11
- import { createServer as createViteServer, mergeConfig, resolveConfig } from "vite";
12
- async function createServer(options, viteConfig = {}, serverOptions = {}) {
13
- const rawConfig = await resolveConfig({}, "serve");
14
- const pluginOptions = rawConfig.slidev || {};
15
- process.env.EDITOR = process.env.EDITOR || "code";
16
- const server = await createViteServer(mergeConfig(viteConfig, {
17
- optimizeDeps: {
18
- entries: [
19
- join(options.clientRoot, "main.ts")
20
- ]
21
- },
22
- plugins: [
23
- await ViteSlidevPlugin(options, pluginOptions, serverOptions)
24
- ]
25
- }));
26
- return server;
27
- }
28
-
29
- export {
30
- createServer
31
- };