Skip to content

Commit 6464b1a

Browse files
committed
Merge branch 'main' of github.com:magidoc-org/magidoc
2 parents 99ec778 + 569af77 commit 6464b1a

File tree

18 files changed

+83
-72
lines changed

18 files changed

+83
-72
lines changed

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"commander": "^12.0.0",
3939
"extract-zip": "^2.0.1",
4040
"fs-extra": "^11.2.0",
41-
"listr2": "^8.1.2",
41+
"listr2": "^8.1.3",
4242
"lodash": "^4.17.21",
4343
"sirv": "^2.0.4",
4444
"zod": "^3.22.4"

packages/plugins/svelte-marked/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"@sveltejs/vite-plugin-svelte": "^3.0.2",
4949
"@types/marked": "^6.0.0",
5050
"@types/prismjs": "^1.26.3",
51-
"svelte-check": "^3.6.8",
52-
"svelte2tsx": "^0.7.5",
51+
"svelte-check": "^3.6.9",
52+
"svelte2tsx": "^0.7.6",
5353
"tslib": "^2.6.2",
5454
"typescript": "~5.4.3",
5555
"vite": "^5.2.7"

packages/plugins/svelte-marked/svelte.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ const config = {
66
preprocess: vitePreprocess(),
77
kit: {
88
adapter: adapter(),
9-
alias: {
10-
$lib: './src/lib',
11-
'$lib/*': './src/lib/*',
12-
},
139
},
1410
}
1511

packages/plugins/svelte-prismjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"@sveltejs/package": "2.3.0",
4949
"@sveltejs/vite-plugin-svelte": "^3.0.2",
5050
"@types/prismjs": "^1.26.3",
51-
"svelte-check": "^3.6.8",
52-
"svelte2tsx": "^0.7.5",
51+
"svelte-check": "^3.6.9",
52+
"svelte2tsx": "^0.7.6",
5353
"tslib": "^2.6.2",
5454
"typescript": "^5.4.3",
5555
"vite": "^5.2.7"

packages/plugins/svelte-prismjs/svelte.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ const config = {
66
preprocess: vitePreprocess(),
77
kit: {
88
adapter: adapter(),
9-
alias: {
10-
$lib: 'src/lib',
11-
'$lib/*': 'src/lib/*',
12-
},
139
},
1410
}
1511

packages/starters/carbon-multi-page/magidoc.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ export function loadVariables() {
3030
return {}
3131
}
3232

33+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
3334
return JSON.parse(fs.readFileSync(ENV_FILE_LOCATION))
3435
}

packages/starters/carbon-multi-page/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"prism-svelte": "^0.5.0",
4949
"prismjs": "^1.29.0",
5050
"svelte": "^4.2.12",
51-
"svelte-check": "^3.6.8",
51+
"svelte-check": "^3.6.9",
5252
"svelte-markdown": "^0.4.1",
5353
"tslib": "^2.6.2",
5454
"typescript": "^5.4.3",

packages/starters/carbon-multi-page/src/lib/components/common/text/TypeLink.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { base } from '$app/paths'
32
import { Link } from 'carbon-components-svelte'
43
import { urlUtils } from '@magidoc/plugin-svelte-marked'
54
import {
@@ -8,6 +7,7 @@
87
isNamedType,
98
isNonNullType,
109
} from 'graphql'
10+
import { getSiteRoot } from '$lib/variables'
1111
1212
export let type: GraphQLType
1313
</script>
@@ -17,7 +17,7 @@
1717
{:else if isNonNullType(type)}
1818
<svelte:self type={type.ofType} />!
1919
{:else if isNamedType(type)}
20-
<Link href={urlUtils.joinUrlPaths(base, `/types/${String(type.name)}`)}
20+
<Link href={urlUtils.joinUrlPaths(getSiteRoot(), 'types', String(type.name))}
2121
>{type.name}</Link
2222
>
2323
{/if}

packages/starters/carbon-multi-page/src/lib/components/markdown/CarbonMarkdown.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { base } from '$app/paths'
32
import MarkdownCode from './code/MarkdownCode.svelte'
43
import MarkdownCodeSpan from './code/MarkdownCodeSpan.svelte'
54
import MarkdownBloquote from './text/MarkdownBloquote.svelte'
@@ -13,10 +12,11 @@
1312
import MarkdownTags from './containers/tags/MarkdownTags.svelte'
1413
import MarkdownHeading from './text/MarkdownHeading.svelte'
1514
import Markdown from '@magidoc/plugin-svelte-marked'
15+
import { getSiteRoot } from '$lib/variables'
1616
1717
export let source: string | undefined | null
1818
19-
const castedBase = base as `/${string}`
19+
const castedBase = getSiteRoot() as `/${string}`
2020
</script>
2121

2222
{#if source}

packages/starters/carbon-multi-page/src/lib/components/tags/DirectiveTag.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { base } from '$app/paths'
2+
import { getSiteRoot } from '$lib/variables'
33
import {
44
getAllowedArgumentsByDirective,
55
isAllowedDirective,
@@ -89,7 +89,10 @@
8989
{#if shouldShowDirective()}
9090
<Tag type="blue">
9191
<a
92-
href={urlUtils.joinUrlPaths(base, `/directives/${directive.name.value}`)}
92+
href={urlUtils.joinUrlPaths(
93+
getSiteRoot(),
94+
`/directives/${directive.name.value}`,
95+
)}
9396
class="override-tooltip-width"
9497
>
9598
<TooltipDefinition tooltipText={text} direction="top" align="center">

0 commit comments

Comments
 (0)