FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
expressive-code/docs/scripts/api-reference.ts at main · expressive-code/expressive-code · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
expressive-code
/
expressive-code
Public
Notifications
You must be signed in to change notification settings
Fork
46
Star
962
Code
Issues
8
Pull requests
9
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
expressive-code
/
docs
/
scripts
/
api-reference.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (39 loc) · 1.37 KB
Breadcrumbs
expressive-code
/
docs
/
scripts
/
api-reference.ts
Copy path
File metadata and controls
44 lines (39 loc) · 1.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
import
path
from
'node:path'
import
{
globSync
}
from
'glob'
import
{
fixLinks
,
processTemplate
}
from
'./typedoc/template-processor'
import
{
generateTypeDoc
,
type
PartialConfig
}
from
'./typedoc/typedoc-runner'
const
packages
=
[
'@expressive-code/core'
,
'@expressive-code/plugin-frames'
,
'@expressive-code/plugin-line-numbers'
,
'@expressive-code/plugin-shiki'
,
'@expressive-code/plugin-text-markers'
,
'@expressive-code/plugin-collapsible-sections'
,
'expressive-code'
,
'rehype-expressive-code'
,
'astro-expressive-code'
,
]
const
sourceFiles
:
PartialConfig
=
{
basePath
:
'../packages'
,
entryPoints
:
packages
.
map
(
(
packageName
)
=>
`../packages/
${
packageName
}
/src/index.ts`
)
,
exclude
:
[
'**/coverage/**/*'
,
'**/node_modules/**/*'
,
'**/dist/**/*'
,
'**/test/**/*'
]
,
skipErrorChecking
:
true
,
tsconfig
:
'../tsconfig.base.json'
,
useTsLinkResolution
:
true
,
}
const
{
outputPath
}
=
await
generateTypeDoc
(
sourceFiles
)
// Process all templates
const
templateDir
=
'./scripts/typedoc/templates'
const
docsDir
=
'./src/content/docs'
const
templateFileSubpaths
=
globSync
(
`**/*.mdx`
,
{
cwd
:
templateDir
,
posix
:
true
,
}
)
templateFileSubpaths
.
forEach
(
(
templateFileSubpath
)
=>
{
processTemplate
(
{
apiDocsPath
:
outputPath
,
templateFilePath
:
path
.
join
(
templateDir
,
templateFileSubpath
)
,
outputFilePath
:
path
.
join
(
docsDir
,
templateFileSubpath
)
,
}
)
}
)
fixLinks
(
docsDir
,
templateFileSubpaths
)
Back
|
FazBrowse Home
|
New Git URL