Skip to content

Commit f96da11

Browse files
committed
chore: update
1 parent a75ca43 commit f96da11

File tree

38 files changed

+114
-614
lines changed

38 files changed

+114
-614
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function HelloWorld() {
2+
return <div>Hello World External</div>;
3+
}

e2e/fixtures/plugin-preview-custom-entry/doc/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export default function HelloWorld() {
1212
}
1313
```
1414

15+
{/* <code src="./Demo.tsx" previewMode="iframe"/> */}
16+
1517
```vue iframe
1618
<template>
1719
<div>Hello World VUE</div>

e2e/fixtures/plugin-preview/doc/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function HelloWorld() {
66
}
77
```
88

9-
<code src="./component.jsx" />
9+
{/* <code src="./component.jsx" /> */}
1010

1111
```json
1212
{
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'node:path';
2-
import { pluginShiki, transformerLineNumber } from '@rspress/plugin-shiki';
32
import {
43
transformerNotationDiff,
54
transformerNotationErrorLevel,
@@ -10,15 +9,15 @@ import { defineConfig } from 'rspress/config';
109

1110
export default defineConfig({
1211
root: path.join(__dirname, 'doc'),
13-
plugins: [
14-
pluginShiki({
12+
markdown: {
13+
showLineNumbers: true,
14+
shiki: {
1515
transformers: [
16-
transformerLineNumber(),
1716
transformerNotationDiff(),
1817
transformerNotationErrorLevel(),
1918
transformerNotationHighlight(),
2019
transformerNotationFocus(),
2120
],
22-
}),
23-
],
21+
},
22+
},
2423
});

e2e/fixtures/prism-syntax-highlighter/doc/index.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

e2e/fixtures/prism-syntax-highlighter/package.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

e2e/fixtures/prism-syntax-highlighter/rspress.config.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

e2e/fixtures/prism-syntax-highlighter/tsconfig.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

e2e/tests/custom-icon.test.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ test.describe('custom icon test', async () => {
2727
const text = await page.evaluate(h1 => h1?.textContent, h1);
2828
await expect(text).toContain('Hello world');
2929

30-
// TODO: custom icon sometimes failed due to https://github.com/web-infra-dev/rspack/issues/5871
31-
// const headerAnchor = await page.$('.rspress-nav-search-button img');
32-
// const src = await page.evaluate(
33-
// headerAnchor => headerAnchor?.getAttribute('src'),
34-
// headerAnchor,
35-
// );
36-
// expect(src).toContain('data:image/svg+xml;base64');
30+
const headerAnchor = await page.$('.rspress-nav-search-button img');
31+
const src = await page.evaluate(
32+
headerAnchor => headerAnchor?.getAttribute('src'),
33+
headerAnchor,
34+
);
35+
expect(src).toContain('data:image/svg+xml;base64');
3736
});
3837
});

e2e/tests/package-manager-tabs.test.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,15 @@ test.describe('tabs-component test', async () => {
4848
);
4949
expect(npmCode).toEqual([
5050
'npm create rspress@latest',
51-
'npm install rspress ',
52-
'-',
53-
'D',
51+
'npm install rspress -D',
5452
]);
5553

5654
await clickTabs[1].click();
5755
const yarnSpanElements = await page.$$('code > span > span');
5856
const yarnCode = await Promise.all(
5957
yarnSpanElements.map(element => element.textContent()),
6058
);
61-
expect(yarnCode).toEqual([
62-
'yarn create rspress',
63-
'yarn add rspress ',
64-
'-',
65-
'D',
66-
]);
59+
expect(yarnCode).toEqual(['yarn create rspress', 'yarn add rspress -D']);
6760

6861
await clickTabs[2].click();
6962
const pnpmSpanElements = await page.$$('code > span > span');
@@ -72,9 +65,7 @@ test.describe('tabs-component test', async () => {
7265
);
7366
expect(pnpmCode).toEqual([
7467
'pnpm create rspress@latest',
75-
'pnpm install rspress ',
76-
'-',
77-
'D',
68+
'pnpm install rspress -D',
7869
]);
7970

8071
await clickTabs[3].click();
@@ -84,9 +75,7 @@ test.describe('tabs-component test', async () => {
8475
);
8576
expect(bunCode).toEqual([
8677
'bun create rspress@latest',
87-
'bun add rspress ',
88-
'-',
89-
'D',
78+
'bun add rspress -D',
9079
]);
9180
});
9281
});

0 commit comments

Comments
 (0)