@slidev/cli 0.48.0-beta.3 → 0.48.0-beta.5
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-VKH7FQSN.mjs → build-C6G7F24X.mjs} +29 -29
- package/dist/{chunk-HESHEOWV.mjs → chunk-7HOZGSL4.mjs} +199 -2782
- package/dist/chunk-CV7O37IO.mjs +155 -0
- package/dist/{chunk-CTBVOVLQ.mjs → chunk-O6TYYGU6.mjs} +4 -16
- package/dist/chunk-U44GKKNH.mjs +4321 -0
- package/dist/cli.mjs +46 -53
- package/dist/{export-MLH55TH5.mjs → export-SM2ZATWB.mjs} +20 -12
- package/dist/index.d.mts +19 -23
- package/dist/index.mjs +4 -18
- package/dist/{unocss-6IVIFJMZ.mjs → unocss-XALM635U.mjs} +3 -3
- package/package.json +9 -9
- package/template.md +133 -26
- package/dist/chunk-DWXI5WEO.mjs +0 -72
- package/dist/chunk-JORVSTMS.mjs +0 -1902
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import
|
|
5
|
+
} from "./chunk-U44GKKNH.mjs";
|
|
6
|
+
import "./chunk-O6TYYGU6.mjs";
|
|
7
|
+
import {
|
|
8
|
+
findPkgRoot
|
|
9
|
+
} from "./chunk-7HOZGSL4.mjs";
|
|
8
10
|
import "./chunk-BXO7ZPPU.mjs";
|
|
9
11
|
|
|
10
12
|
// node/build.ts
|
|
@@ -56,33 +58,31 @@ async function build(options, viteConfig = {}, args) {
|
|
|
56
58
|
console.log(yellow(" Monaco is disabled in the build, to enabled it, set `monaco: true` in the frontmatter"));
|
|
57
59
|
} else {
|
|
58
60
|
console.log(blue(" building for Monaco...\n"));
|
|
59
|
-
await
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
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")
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
} finally {
|
|
@@ -98,7 +98,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
98
98
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
99
99
|
`, "utf-8");
|
|
100
100
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
101
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
101
|
+
const { exportSlides, getExportOptions } = await import("./export-SM2ZATWB.mjs");
|
|
102
102
|
const port = 12445;
|
|
103
103
|
const app = connect();
|
|
104
104
|
const server = http.createServer(app);
|