@slidev/cli 0.49.10 → 0.49.12
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/README.md +1 -1
- package/dist/{build-I53OZ3FH.mjs → build-U63KCQIF.mjs} +6 -16
- package/dist/{chunk-SRWMA3GA.mjs → chunk-KNG6PIQ7.mjs} +517 -464
- package/dist/chunk-Z7QBEIOP.mjs +29 -0
- package/dist/cli.mjs +9 -5
- package/dist/{export-BSOHDR2A.mjs → export-IRR3JZOI.mjs} +13 -6
- package/dist/index.mjs +2 -2
- package/package.json +20 -21
- package/template.md +15 -15
- package/dist/chunk-YTSG6ZR5.mjs +0 -44
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ Presentation <b>slide</b>s for <b>dev</b>elopers 🧑💻👩💻👨
|
|
|
36
36
|
|
|
37
37
|
## Features
|
|
38
38
|
|
|
39
|
-
- 📝 [**Markdown
|
|
39
|
+
- 📝 [**Markdown-based**](https://sli.dev/guide/syntax.html) - use your favorite editors and workflow
|
|
40
40
|
- 🧑💻 [**Developer Friendly**](https://sli.dev/guide/syntax.html#code-blocks) - built-in syntax highlighting, live coding, etc.
|
|
41
41
|
- 🎨 [**Themable**](https://sli.dev/themes/gallery.html) - theme can be shared and used with npm packages.
|
|
42
42
|
- 🌈 [**Stylish**](https://sli.dev/guide/syntax.html#embedded-styles) - on-demand utilities via [UnoCSS](https://github.com/unocss/unocss).
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
ViteSlidevPlugin,
|
|
3
2
|
getIndexHtml,
|
|
4
|
-
|
|
5
|
-
} from "./chunk-
|
|
3
|
+
resolveViteConfigs
|
|
4
|
+
} from "./chunk-KNG6PIQ7.mjs";
|
|
6
5
|
import "./chunk-LOUKLO2C.mjs";
|
|
7
6
|
import "./chunk-RG2EEPCO.mjs";
|
|
8
7
|
import "./chunk-BXO7ZPPU.mjs";
|
|
@@ -11,7 +10,7 @@ import "./chunk-BXO7ZPPU.mjs";
|
|
|
11
10
|
import { resolve } from "node:path";
|
|
12
11
|
import http from "node:http";
|
|
13
12
|
import fs from "fs-extra";
|
|
14
|
-
import {
|
|
13
|
+
import { build as viteBuild } from "vite";
|
|
15
14
|
import connect from "connect";
|
|
16
15
|
import sirv from "sirv";
|
|
17
16
|
async function build(options, viteConfig = {}, args) {
|
|
@@ -22,11 +21,9 @@ async function build(options, viteConfig = {}, args) {
|
|
|
22
21
|
await fs.writeFile(indexPath, await getIndexHtml(options), "utf-8");
|
|
23
22
|
let config = void 0;
|
|
24
23
|
try {
|
|
25
|
-
|
|
24
|
+
const inlineConfig = await resolveViteConfigs(
|
|
26
25
|
options,
|
|
27
|
-
viteConfig,
|
|
28
26
|
{
|
|
29
|
-
root: options.userRoot,
|
|
30
27
|
plugins: [
|
|
31
28
|
{
|
|
32
29
|
name: "resolve-config",
|
|
@@ -39,16 +36,9 @@ async function build(options, viteConfig = {}, args) {
|
|
|
39
36
|
chunkSizeWarningLimit: 2e3
|
|
40
37
|
}
|
|
41
38
|
},
|
|
39
|
+
viteConfig,
|
|
42
40
|
"build"
|
|
43
41
|
);
|
|
44
|
-
inlineConfig = mergeConfig(
|
|
45
|
-
inlineConfig,
|
|
46
|
-
{
|
|
47
|
-
plugins: [
|
|
48
|
-
await ViteSlidevPlugin(options, inlineConfig.slidev || {})
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
42
|
await viteBuild(inlineConfig);
|
|
53
43
|
} finally {
|
|
54
44
|
if (originalIndexHTML != null)
|
|
@@ -63,7 +53,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
63
53
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
64
54
|
`, "utf-8");
|
|
65
55
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
66
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
56
|
+
const { exportSlides, getExportOptions } = await import("./export-IRR3JZOI.mjs");
|
|
67
57
|
const port = 12445;
|
|
68
58
|
const app = connect();
|
|
69
59
|
const server = http.createServer(app);
|