Skip to content

Commit

Permalink
docs: replace <details> with ::: details
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Dec 4, 2024
1 parent 04f250f commit a11d565
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
6 changes: 2 additions & 4 deletions docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ If you are using Vite and have a `vite.config` file, Vitest will read it to matc

To configure `vitest` itself, add `test` property in your Vite config. You'll also need to add a reference to Vitest types using a [triple slash command](https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html#-reference-types-) at the top of your config file, if you are importing `defineConfig` from `vite` itself.

<details>
<summary>Open Config Examples</summary>

::: details Open Config Examples
Using `defineConfig` from `vite` you should follow this:

```ts [vite.config.js]
Expand Down Expand Up @@ -93,7 +91,7 @@ export default defineConfig(configEnv => mergeConfig(
})
))
```
</details>
:::

::: warning
_All listed options_ on this page are located within a `test` property inside the configuration:
Expand Down
6 changes: 2 additions & 4 deletions docs/guide/improving-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ Collect the results stored in `.vitest-reports` directory from each machine and
vitest --merge-reports
```

<details>
<summary>Github action example</summary>

::: details Github action example
This setup is also used at https://github.com/vitest-tests/test-sharding.

```yaml
Expand Down Expand Up @@ -162,7 +160,7 @@ jobs:
run: npx vitest --merge-reports
```
</details>
:::
:::tip
Test sharding can also become useful on high CPU-count machines.
Expand Down
14 changes: 4 additions & 10 deletions docs/guide/in-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ export default defineConfig({

### Other Bundlers

<details mt4>
<summary text-xl>unbuild</summary>

::: details unbuild
```ts [build.config.ts]
import { defineBuildConfig } from 'unbuild'

Expand All @@ -85,12 +83,9 @@ export default defineBuildConfig({
```

Learn more: [unbuild](https://github.com/unjs/unbuild)
:::

</details>

<details my2>
<summary text-xl>Rollup</summary>

::: details Rollup
```ts [rollup.config.js]
import replace from '@rollup/plugin-replace' // [!code ++]
Expand All @@ -105,8 +100,7 @@ export default {
```

Learn more: [Rollup](https://rollupjs.org/)

</details>
:::

## TypeScript

Expand Down

0 comments on commit a11d565

Please sign in to comment.