@slidev/cli 0.48.0-beta.14 → 0.48.0-beta.16

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.
@@ -2,21 +2,18 @@ import {
2
2
  ViteSlidevPlugin,
3
3
  getIndexHtml,
4
4
  mergeViteConfigs
5
- } from "./chunk-6NOVKCAJ.mjs";
5
+ } from "./chunk-TMXTXTYI.mjs";
6
6
  import "./chunk-O6TYYGU6.mjs";
7
- import {
8
- findPkgRoot
9
- } from "./chunk-7HOZGSL4.mjs";
7
+ import "./chunk-G3BP3FUT.mjs";
10
8
  import "./chunk-BXO7ZPPU.mjs";
11
9
 
12
10
  // node/build.ts
13
- import { join, resolve } from "node:path";
11
+ import { resolve } from "node:path";
14
12
  import http from "node:http";
15
13
  import fs from "fs-extra";
16
14
  import { mergeConfig, build as viteBuild } from "vite";
17
15
  import connect from "connect";
18
16
  import sirv from "sirv";
19
- import { blue, yellow } from "kolorist";
20
17
  async function build(options, viteConfig = {}, args) {
21
18
  const indexPath = resolve(options.userRoot, "index.html");
22
19
  let originalIndexHTML;
@@ -53,38 +50,6 @@ async function build(options, viteConfig = {}, args) {
53
50
  }
54
51
  );
55
52
  await viteBuild(inlineConfig);
56
- if (options.data.features.monaco) {
57
- if (options.data.config.monaco === "dev") {
58
- console.log(yellow(" Monaco is disabled in the build, to enabled it, set `monaco: true` in the frontmatter"));
59
- } else {
60
- console.log(blue(" building for Monaco...\n"));
61
- const monacoRoot = await findPkgRoot("monaco-editor", options.clientRoot, true);
62
- const getWorkerPath = (path) => [join(monacoRoot, "esm/vs", path)];
63
- await viteBuild({
64
- root: join(options.clientRoot, "iframes/monaco"),
65
- base: `${config.base}iframes/monaco/`,
66
- plugins: [
67
- await ViteSlidevPlugin(options, inlineConfig.slidev || {})
68
- ],
69
- build: {
70
- outDir: resolve(options.userRoot, config.build.outDir, "iframes/monaco"),
71
- // fix for monaco workers
72
- // https://github.com/vitejs/vite/issues/1927#issuecomment-805803918
73
- rollupOptions: {
74
- output: {
75
- manualChunks: {
76
- jsonWorker: getWorkerPath("language/json/json.worker"),
77
- cssWorker: getWorkerPath("language/css/css.worker"),
78
- htmlWorker: getWorkerPath("language/html/html.worker"),
79
- tsWorker: getWorkerPath("language/typescript/ts.worker"),
80
- editorWorker: getWorkerPath("editor/editor.worker")
81
- }
82
- }
83
- }
84
- }
85
- });
86
- }
87
- }
88
53
  } finally {
89
54
  if (originalIndexHTML != null)
90
55
  await fs.writeFile(indexPath, originalIndexHTML, "utf-8");
@@ -98,7 +63,7 @@ async function build(options, viteConfig = {}, args) {
98
63
  await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
99
64
  `, "utf-8");
100
65
  if ([true, "true", "auto"].includes(options.data.config.download)) {
101
- const { exportSlides, getExportOptions } = await import("./export-SM2ZATWB.mjs");
66
+ const { exportSlides, getExportOptions } = await import("./export-JD32O5W6.mjs");
102
67
  const port = 12445;
103
68
  const app = connect();
104
69
  const server = http.createServer(app);
@@ -4,12 +4,12 @@ import {
4
4
  mergeViteConfigs,
5
5
  require_semver,
6
6
  version
7
- } from "./chunk-6NOVKCAJ.mjs";
7
+ } from "./chunk-TMXTXTYI.mjs";
8
8
  import {
9
9
  createResolver,
10
10
  getRoots,
11
11
  resolveEntry
12
- } from "./chunk-7HOZGSL4.mjs";
12
+ } from "./chunk-G3BP3FUT.mjs";
13
13
  import {
14
14
  __toESM
15
15
  } from "./chunk-BXO7ZPPU.mjs";
@@ -107,7 +107,7 @@ var debug = _debug("slidev:options");
107
107
  async function resolveOptions(options, mode) {
108
108
  const rootsInfo = await getRoots();
109
109
  const entry = await resolveEntry(options.entry || "slides.md", rootsInfo);
110
- const loaded = await parser.load(rootsInfo.userRoot, entry);
110
+ const loaded = await parser.load(rootsInfo.userRoot, entry, void 0, mode);
111
111
  const themeRaw = options.theme || loaded.headmatter.theme || "default";
112
112
  const [theme, themeRoot] = await resolveTheme(themeRaw, entry);
113
113
  const themeRoots = themeRoot ? [themeRoot] : [];
@@ -5545,7 +5545,6 @@ async function getRoots() {
5545
5545
  export {
5546
5546
  toAtFS,
5547
5547
  resolveImportPath,
5548
- findPkgRoot,
5549
5548
  resolveEntry,
5550
5549
  createResolver,
5551
5550
  getRoots