@slidev/cli 0.48.0-beta.19 → 0.48.0-beta.20
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-V63BEPH2.mjs → build-5AFXNUEB.mjs} +3 -3
- package/dist/{chunk-NOI2WLJK.mjs → chunk-CV7OWJOF.mjs} +1 -1
- package/dist/{chunk-BKITU4YJ.mjs → chunk-KNY3KC45.mjs} +2 -2
- package/dist/{chunk-XW74EPKM.mjs → chunk-O56CS6WQ.mjs} +15 -19
- package/dist/cli.mjs +6 -6
- package/dist/{export-FEKJLPIJ.mjs → export-65BQ7S5F.mjs} +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +4 -4
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O56CS6WQ.mjs";
|
|
6
6
|
import "./chunk-O6TYYGU6.mjs";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-CV7OWJOF.mjs";
|
|
8
8
|
|
|
9
9
|
// node/build.ts
|
|
10
10
|
import { resolve } from "node:path";
|
|
@@ -62,7 +62,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
62
62
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
63
63
|
`, "utf-8");
|
|
64
64
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
65
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
65
|
+
const { exportSlides, getExportOptions } = await import("./export-65BQ7S5F.mjs");
|
|
66
66
|
const port = 12445;
|
|
67
67
|
const app = connect();
|
|
68
68
|
const server = http.createServer(app);
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
checkEngine,
|
|
4
4
|
mergeViteConfigs,
|
|
5
5
|
version
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O56CS6WQ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
createResolver,
|
|
9
9
|
getRoots,
|
|
10
10
|
resolveEntry
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CV7OWJOF.mjs";
|
|
12
12
|
|
|
13
13
|
// node/server.ts
|
|
14
14
|
import { join } from "node:path";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
resolveImportPath,
|
|
6
6
|
toAtFS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CV7OWJOF.mjs";
|
|
8
8
|
|
|
9
9
|
// package.json
|
|
10
|
-
var version = "0.48.0-beta.
|
|
10
|
+
var version = "0.48.0-beta.20";
|
|
11
11
|
|
|
12
12
|
// node/common.ts
|
|
13
13
|
import { existsSync, promises as fs } from "node:fs";
|
|
@@ -180,6 +180,15 @@ var dependencies = {
|
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
// node/plugins/extendConfig.ts
|
|
183
|
+
var INCLUDE = [
|
|
184
|
+
...Object.keys(dependencies),
|
|
185
|
+
"codemirror/mode/javascript/javascript",
|
|
186
|
+
"codemirror/mode/css/css",
|
|
187
|
+
"codemirror/mode/markdown/markdown",
|
|
188
|
+
"codemirror/mode/xml/xml",
|
|
189
|
+
"codemirror/mode/htmlmixed/htmlmixed",
|
|
190
|
+
"codemirror/addon/display/placeholder"
|
|
191
|
+
];
|
|
183
192
|
var EXCLUDE = [
|
|
184
193
|
"@slidev/shared",
|
|
185
194
|
"@slidev/types",
|
|
@@ -216,7 +225,7 @@ function createConfigPlugin(options) {
|
|
|
216
225
|
},
|
|
217
226
|
optimizeDeps: {
|
|
218
227
|
exclude: EXCLUDE,
|
|
219
|
-
include:
|
|
228
|
+
include: INCLUDE.filter((i) => !EXCLUDE.includes(i)).map((i) => `@slidev/cli > @slidev/client > ${i}`)
|
|
220
229
|
},
|
|
221
230
|
css: options.data.config.css === "unocss" ? {
|
|
222
231
|
postcss: {
|
|
@@ -1617,14 +1626,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
1617
1626
|
async function generateMonacoTypes() {
|
|
1618
1627
|
const typesRoot = join4(userRoot, "snippets");
|
|
1619
1628
|
const files = await fg2(["**/*.ts", "**/*.mts", "**/*.cts"], { cwd: typesRoot });
|
|
1620
|
-
let result =
|
|
1621
|
-
'import * as monaco from "monaco-editor"',
|
|
1622
|
-
"async function addFile(mod, path) {",
|
|
1623
|
-
" const code = (await mod).default",
|
|
1624
|
-
' monaco.languages.typescript.typescriptDefaults.addExtraLib(code, "file:///" + path)',
|
|
1625
|
-
' monaco.editor.createModel(code, "javascript", monaco.Uri.file(path))',
|
|
1626
|
-
"}"
|
|
1627
|
-
].join("\n");
|
|
1629
|
+
let result = 'import { addFile } from "@slidev/client/setup/monaco.ts"\n';
|
|
1628
1630
|
for (const file of files) {
|
|
1629
1631
|
const url = `${toAtFS(resolve2(typesRoot, file))}?monaco-types&raw`;
|
|
1630
1632
|
result += `addFile(import(${JSON.stringify(url)}), ${JSON.stringify(file)})
|
|
@@ -1934,14 +1936,8 @@ function createMonacoTypesLoader({ userRoot }) {
|
|
|
1934
1936
|
if (!files.length)
|
|
1935
1937
|
return "";
|
|
1936
1938
|
return [
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
" const code = (await mod).default",
|
|
1940
|
-
` const path = ${JSON.stringify(`/node_modules/${name}/`)} + subPath`,
|
|
1941
|
-
' monaco.languages.typescript.typescriptDefaults.addExtraLib(code, "file://" + path)',
|
|
1942
|
-
' monaco.editor.createModel(code, "javascript", monaco.Uri.file(path))',
|
|
1943
|
-
"}",
|
|
1944
|
-
...files.map((file) => `addFile(import(${JSON.stringify(`${toAtFS(resolve4(root, file))}?monaco-types&raw`)}), ${JSON.stringify(file)})`)
|
|
1939
|
+
'import { addFile } from "@slidev/client/setup/monaco.ts"',
|
|
1940
|
+
...files.map((file) => `addFile(import(${JSON.stringify(`${toAtFS(resolve4(root, file))}?monaco-types&raw`)}), ${JSON.stringify(`node_modules/${name}/${file}`)})`)
|
|
1945
1941
|
].join("\n");
|
|
1946
1942
|
}
|
|
1947
1943
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
resolveAddons,
|
|
6
6
|
resolveOptions,
|
|
7
7
|
resolveTheme
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KNY3KC45.mjs";
|
|
9
9
|
import {
|
|
10
10
|
version
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-O56CS6WQ.mjs";
|
|
12
12
|
import {
|
|
13
13
|
loadSetups
|
|
14
14
|
} from "./chunk-O6TYYGU6.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getRoots
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CV7OWJOF.mjs";
|
|
18
18
|
|
|
19
19
|
// node/cli.ts
|
|
20
20
|
import path from "node:path";
|
|
@@ -276,7 +276,7 @@ cli.command(
|
|
|
276
276
|
}).strict().help(),
|
|
277
277
|
async (args) => {
|
|
278
278
|
const { entry, theme, watch, base, download, out, inspect } = args;
|
|
279
|
-
const { build } = await import("./build-
|
|
279
|
+
const { build } = await import("./build-5AFXNUEB.mjs");
|
|
280
280
|
for (const entryFile of entry) {
|
|
281
281
|
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
282
282
|
if (download && !options.data.config.download)
|
|
@@ -351,7 +351,7 @@ cli.command(
|
|
|
351
351
|
(args) => exportOptions(commonOptions(args)).strict().help(),
|
|
352
352
|
async (args) => {
|
|
353
353
|
const { entry, theme } = args;
|
|
354
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
354
|
+
const { exportSlides, getExportOptions } = await import("./export-65BQ7S5F.mjs");
|
|
355
355
|
const port = await getPort(12445);
|
|
356
356
|
for (const entryFile of entry) {
|
|
357
357
|
const options = await resolveOptions({ entry: entryFile, theme }, "export");
|
|
@@ -395,7 +395,7 @@ cli.command(
|
|
|
395
395
|
output,
|
|
396
396
|
timeout
|
|
397
397
|
}) => {
|
|
398
|
-
const { exportNotes } = await import("./export-
|
|
398
|
+
const { exportNotes } = await import("./export-65BQ7S5F.mjs");
|
|
399
399
|
const port = await getPort(12445);
|
|
400
400
|
for (const entryFile of entry) {
|
|
401
401
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
package/dist/index.mjs
CHANGED
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
createServer,
|
|
3
3
|
parser,
|
|
4
4
|
resolveOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KNY3KC45.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ViteSlidevPlugin
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-O56CS6WQ.mjs";
|
|
9
9
|
import "./chunk-O6TYYGU6.mjs";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-CV7OWJOF.mjs";
|
|
11
11
|
export {
|
|
12
12
|
ViteSlidevPlugin,
|
|
13
13
|
createServer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
|
-
"version": "0.48.0-beta.
|
|
3
|
+
"version": "0.48.0-beta.20",
|
|
4
4
|
"description": "Presentation slides for developers",
|
|
5
5
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"vitefu": "^0.2.5",
|
|
106
106
|
"vue": "^3.4.20",
|
|
107
107
|
"yargs": "^17.7.2",
|
|
108
|
-
"@slidev/client": "0.48.0-beta.
|
|
109
|
-
"@slidev/parser": "0.48.0-beta.
|
|
110
|
-
"@slidev/types": "0.48.0-beta.
|
|
108
|
+
"@slidev/client": "0.48.0-beta.20",
|
|
109
|
+
"@slidev/parser": "0.48.0-beta.20",
|
|
110
|
+
"@slidev/types": "0.48.0-beta.20"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|