forked from slidevjs/slidev
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathoptions.ts
More file actions
75 lines (65 loc) · 1.59 KB
/
Copy pathoptions.ts
File metadata and controls
75 lines (65 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import type { MarkdownItShikiOptions } from '@shikijs/markdown-it'
import type { KatexOptions } from 'katex'
import type { CodeOptionsThemes, ShorthandsBundle } from 'shiki/core'
import type { SlidevData } from './types'
export interface RootsInfo {
cliRoot: string
clientRoot: string
userRoot: string
userPkgJson: Record<string, any>
userWorkspaceRoot: string
}
export interface SlidevEntryOptions {
/**
* Markdown entry
*/
entry: string
/**
* Theme id
*/
theme?: string
/**
* Remote password
*/
remote?: string
/**
* Enable inspect plugin
*/
inspect?: boolean
/**
* Build with --download option
*/
download?: boolean
/**
* Base URL in dev or build mode
*/
base?: string
}
export interface ResolvedSlidevOptions extends RootsInfo, SlidevEntryOptions {
data: SlidevData
themeRaw: string
themeRoots: string[]
addonRoots: string[]
/**
* =`[...themeRoots, ...addonRoots, userRoot]` (`clientRoot` excluded)
*/
roots: string[]
mode: 'dev' | 'build' | 'export'
utils: ResolvedSlidevUtils
}
export interface ResolvedSlidevUtils {
shiki: ShorthandsBundle<string, string>
shikiOptions: MarkdownItShikiOptions & CodeOptionsThemes
katexOptions: KatexOptions | null
indexHtml: string
define: Record<string, string>
iconsResolvePath: string[]
isMonacoTypesIgnored: (pkg: string) => boolean
getLayouts: () => Record<string, string>
}
export interface SlidevServerOptions {
/**
* @returns `false` if server should be restarted
*/
loadData?: (loadedSource: Record<string, string>) => Promise<SlidevData | false>
}