@slidev/cli 0.27.13 → 0.27.17
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-EAZGCU4K.mjs → build-3PYDYXWL.mjs} +5 -4
- package/dist/{build-63UO2WKL.js → build-DYELZSUV.js} +27 -26
- package/dist/{chunk-Y4U4HNBF.js → chunk-3QMXOBKW.js} +4 -4
- package/dist/{chunk-5CE4DP4R.mjs → chunk-6HK3HED2.mjs} +1 -1
- package/dist/{chunk-6GSA3UIY.js → chunk-7EYE5BOQ.js} +24 -3
- package/dist/{chunk-MJ3BO472.js → chunk-DVHCB7TL.js} +56 -55
- package/dist/{chunk-C2FOYGKS.mjs → chunk-L7QFSRQN.mjs} +4 -3
- package/dist/{chunk-YUEXXPFU.js → chunk-LJGOLBO3.js} +123 -118
- package/dist/{chunk-UHBOZECB.mjs → chunk-NIUZ32MT.mjs} +11 -6
- package/dist/{chunk-62N46WVW.mjs → chunk-QQD2JVXL.mjs} +23 -2
- package/dist/cli.js +19 -19
- package/dist/cli.mjs +6 -6
- package/dist/{export-FBGRGWZB.js → export-OUL6OBWA.js} +5 -5
- package/dist/{export-KVVXZJNX.mjs → export-P2HOWL7Q.mjs} +2 -2
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -7
- package/dist/index.mjs +6 -4
- package/package.json +5 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-L7QFSRQN.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require,
|
|
8
8
|
__spreadValues,
|
|
9
9
|
__toModule
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QQD2JVXL.mjs";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
13
13
|
var require_build = __commonJS({
|
|
@@ -371,7 +371,7 @@ async function build(options, viteConfig = {}) {
|
|
|
371
371
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
372
372
|
`, "utf-8");
|
|
373
373
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
374
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
374
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-P2HOWL7Q.mjs")));
|
|
375
375
|
const port = 12445;
|
|
376
376
|
const app = connect();
|
|
377
377
|
const server = http.createServer(app);
|
|
@@ -389,7 +389,8 @@ async function build(options, viteConfig = {}) {
|
|
|
389
389
|
base: config.base,
|
|
390
390
|
dark: options.data.config.colorSchema === "dark",
|
|
391
391
|
width: 1920,
|
|
392
|
-
height: Math.round(1920 / options.data.config.aspectRatio)
|
|
392
|
+
height: Math.round(1920 / options.data.config.aspectRatio),
|
|
393
|
+
routerMode: options.data.config.routerMode
|
|
393
394
|
});
|
|
394
395
|
server.close();
|
|
395
396
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDVHCB7TLjs = require('./chunk-DVHCB7TL.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk7EYE5BOQjs = require('./chunk-7EYE5BOQ.js');
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
14
|
-
var require_build =
|
|
14
|
+
var require_build = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
15
15
|
"../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js"(exports) {
|
|
16
|
-
|
|
17
|
-
var qs =
|
|
16
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
17
|
+
var qs = _chunk7EYE5BOQjs.__require.call(void 0, "querystring");
|
|
18
18
|
function parse(req) {
|
|
19
19
|
let raw = req.url;
|
|
20
20
|
if (raw == null)
|
|
@@ -40,11 +40,11 @@ var require_build = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
43
|
-
var require_sync =
|
|
43
|
+
var require_sync = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
44
44
|
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
45
|
-
|
|
46
|
-
var { join: join2, resolve: resolve2 } =
|
|
47
|
-
var { readdirSync, statSync } =
|
|
45
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
46
|
+
var { join: join2, resolve: resolve2 } = _chunk7EYE5BOQjs.__require.call(void 0, "path");
|
|
47
|
+
var { readdirSync, statSync } = _chunk7EYE5BOQjs.__require.call(void 0, "fs");
|
|
48
48
|
module.exports = function list(dir, callback, pre = "") {
|
|
49
49
|
dir = resolve2(".", dir);
|
|
50
50
|
let arr = readdirSync(dir);
|
|
@@ -59,9 +59,9 @@ var require_sync = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js
|
|
62
|
-
var require_Mime =
|
|
62
|
+
var require_Mime = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
63
63
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js"(exports, module) {
|
|
64
|
-
|
|
64
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
65
65
|
"use strict";
|
|
66
66
|
function Mime() {
|
|
67
67
|
this._types = Object.create(null);
|
|
@@ -112,17 +112,17 @@ var require_Mime = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js
|
|
115
|
-
var require_standard =
|
|
115
|
+
var require_standard = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
116
116
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js"(exports, module) {
|
|
117
|
-
|
|
117
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
118
118
|
module.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma", "es"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/mrb-consumer+xml": ["*xdf"], "application/mrb-publish+xml": ["*xdf"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["*xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-error+xml": ["xer"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js
|
|
123
|
-
var require_lite =
|
|
123
|
+
var require_lite = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
124
124
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js"(exports, module) {
|
|
125
|
-
|
|
125
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
126
126
|
"use strict";
|
|
127
127
|
var Mime = require_Mime();
|
|
128
128
|
module.exports = new Mime(require_standard());
|
|
@@ -130,11 +130,11 @@ var require_lite = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
// ../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js
|
|
133
|
-
var require_build2 =
|
|
133
|
+
var require_build2 = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
|
|
134
134
|
"../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js"(exports, module) {
|
|
135
|
-
|
|
136
|
-
var fs2 =
|
|
137
|
-
var { join: join2, normalize, resolve: resolve2 } =
|
|
135
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
136
|
+
var fs2 = _chunk7EYE5BOQjs.__require.call(void 0, "fs");
|
|
137
|
+
var { join: join2, normalize, resolve: resolve2 } = _chunk7EYE5BOQjs.__require.call(void 0, "path");
|
|
138
138
|
var { parse } = require_build();
|
|
139
139
|
var list = require_sync();
|
|
140
140
|
var mime = require_lite();
|
|
@@ -187,7 +187,7 @@ var require_build2 = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
187
187
|
}
|
|
188
188
|
function send(req, res, file, stats, headers) {
|
|
189
189
|
let code = 200, tmp, opts = {};
|
|
190
|
-
headers =
|
|
190
|
+
headers = _chunk7EYE5BOQjs.__spreadValues.call(void 0, {}, headers);
|
|
191
191
|
for (let key in headers) {
|
|
192
192
|
tmp = res.getHeader(key);
|
|
193
193
|
if (tmp)
|
|
@@ -309,8 +309,8 @@ var require_build2 = _chunk6GSA3UIYjs.__commonJS.call(void 0, {
|
|
|
309
309
|
});
|
|
310
310
|
|
|
311
311
|
// node/build.ts
|
|
312
|
-
|
|
313
|
-
var import_sirv =
|
|
312
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
313
|
+
var import_sirv = _chunk7EYE5BOQjs.__toModule.call(void 0, require_build2());
|
|
314
314
|
var _path = require('path');
|
|
315
315
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
316
316
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -324,12 +324,12 @@ async function build(options, viteConfig = {}) {
|
|
|
324
324
|
let originalIndexHTML;
|
|
325
325
|
if (_fsextra2.default.existsSync(indexPath))
|
|
326
326
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
327
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
327
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkDVHCB7TLjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
328
328
|
let config = void 0;
|
|
329
329
|
try {
|
|
330
330
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
331
331
|
plugins: [
|
|
332
|
-
await
|
|
332
|
+
await _chunkDVHCB7TLjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
333
333
|
{
|
|
334
334
|
name: "resolve-config",
|
|
335
335
|
configResolved(_config) {
|
|
@@ -379,7 +379,7 @@ async function build(options, viteConfig = {}) {
|
|
|
379
379
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
380
380
|
`, "utf-8");
|
|
381
381
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
382
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
382
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-OUL6OBWA.js")));
|
|
383
383
|
const port = 12445;
|
|
384
384
|
const app = _connect2.default.call(void 0, );
|
|
385
385
|
const server = _http2.default.createServer(app);
|
|
@@ -397,7 +397,8 @@ async function build(options, viteConfig = {}) {
|
|
|
397
397
|
base: config.base,
|
|
398
398
|
dark: options.data.config.colorSchema === "dark",
|
|
399
399
|
width: 1920,
|
|
400
|
-
height: Math.round(1920 / options.data.config.aspectRatio)
|
|
400
|
+
height: Math.round(1920 / options.data.config.aspectRatio),
|
|
401
|
+
routerMode: options.data.config.routerMode
|
|
401
402
|
});
|
|
402
403
|
server.close();
|
|
403
404
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDVHCB7TLjs = require('./chunk-DVHCB7TL.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk7EYE5BOQjs = require('./chunk-7EYE5BOQ.js');
|
|
7
7
|
|
|
8
8
|
// node/server.ts
|
|
9
|
-
|
|
9
|
+
_chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
|
|
10
10
|
var _path = require('path');
|
|
11
11
|
var _vite = require('vite');
|
|
12
12
|
async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
@@ -20,7 +20,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
plugins: [
|
|
23
|
-
await
|
|
23
|
+
await _chunkDVHCB7TLjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
24
24
|
]
|
|
25
25
|
}));
|
|
26
26
|
return server;
|
|
@@ -57,10 +57,11 @@ var init_cjs_shims = __esm({
|
|
|
57
57
|
|
|
58
58
|
// node/utils.ts
|
|
59
59
|
init_cjs_shims();
|
|
60
|
+
var _path = require('path');
|
|
60
61
|
var _utils = require('@antfu/utils');
|
|
61
62
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
62
63
|
var _resolve = require('resolve');
|
|
63
|
-
var
|
|
64
|
+
var _globaldirs = require('global-dirs'); var _globaldirs2 = _interopRequireDefault(_globaldirs);
|
|
64
65
|
function toAtFS(path) {
|
|
65
66
|
return `/@fs${_utils.ensurePrefix.call(void 0, "/", _utils.slash.call(void 0, path))}`;
|
|
66
67
|
}
|
|
@@ -73,14 +74,33 @@ function resolveImportPath(importName, ensure = false) {
|
|
|
73
74
|
}
|
|
74
75
|
if (_isinstalledglobally2.default) {
|
|
75
76
|
try {
|
|
76
|
-
return
|
|
77
|
+
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
77
78
|
} catch (e2) {
|
|
78
79
|
}
|
|
80
|
+
try {
|
|
81
|
+
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
82
|
+
} catch (e3) {
|
|
83
|
+
}
|
|
79
84
|
}
|
|
80
85
|
if (ensure)
|
|
81
86
|
throw new Error(`Failed to resolve package "${importName}"`);
|
|
82
87
|
return void 0;
|
|
83
88
|
}
|
|
89
|
+
function resolveGlobalImportPath(importName) {
|
|
90
|
+
try {
|
|
91
|
+
return _resolve.sync.call(void 0, importName, { preserveSymlinks: false, basedir: __dirname });
|
|
92
|
+
} catch (e4) {
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
96
|
+
} catch (e5) {
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
100
|
+
} catch (e6) {
|
|
101
|
+
}
|
|
102
|
+
throw new Error(`Failed to resolve global package "${importName}"`);
|
|
103
|
+
}
|
|
84
104
|
function stringifyMarkdownTokens(tokens) {
|
|
85
105
|
return tokens.map((token) => {
|
|
86
106
|
var _a;
|
|
@@ -104,4 +124,5 @@ function generateGoogleFontsUrl(options) {
|
|
|
104
124
|
|
|
105
125
|
|
|
106
126
|
|
|
107
|
-
|
|
127
|
+
|
|
128
|
+
exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__require = __require; exports.__commonJS = __commonJS; exports.__toModule = __toModule; exports.init_cjs_shims = init_cjs_shims; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl;
|