@voidzero-dev/vitepress-theme 3.0.2 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,30 +4,31 @@
4
4
  <div class="flex flex-col gap-3 max-w-md">
5
5
  <div class="flex gap-3 items-center">
6
6
  <img src="@assets/icons/vitest-light.svg" alt="Vitest icon" class="size-5">
7
- <span
8
- class="text-grey text-xs font-medium font-mono uppercase tracking-wide">Why Vitest</span>
7
+ <span class="text-grey text-xs font-medium font-mono uppercase tracking-wide">Why Vitest</span>
9
8
  </div>
10
9
  <h3 class="text-white max-w-xl text-balance">The Vite Native Test Runner</h3>
11
10
  <a href="/guide/why" target="_blank" class="button w-fit mt-8 hidden lg:block">Learn more</a>
12
11
  </div>
13
12
  <div class="lg:max-w-lg">
14
- <p class="text-pretty">
15
- Vite's out-of-the-box support for common web patterns, features like glob imports and SSR primitives, and its
16
- many plugins and integrations are fostering a vibrant ecosystem. Its dev and build story are key to its
17
- success.
18
- For docs, there are several SSG-based alternatives powered by Vite. Vite's Unit Testing story hasn't been
19
- clear
20
- though. Existing options like were created in a different context. There is a lot of duplication between <code
21
- class="mr-1 outline-none bg-nickel/50 text-zest">Jest</code>
22
- and Vite, forcing users to configure two different pipelines.
13
+ <p class="text-pretty mb-5">
14
+ <a href="https://vite.dev" target="_blank"><code
15
+ class="mr-1 outline-none bg-nickel/50 text-vite">Vite</code></a> has become the shared foundation for
16
+ modern
17
+ web development - but test runners like <a href="https://jestjs.io/" target="_blank"><code
18
+ class="mr-1 outline-none bg-nickel/50 text-zest">Jest</code></a>
19
+ cannot reuse its resolution and transform
20
+ pipeline, resulting in duplicated configurations and compatibility issues.
23
21
  </p>
22
+ <p class="text-pretty mb-5">Vitest was born to solve this problem: by building on top of Vite, Vitest natively
23
+ understands everything you have configured for your Vite app, and the tests just work.</p>
24
+ <p class="text-pretty">That said, you can totally use Vitest without using Vite - even for backend code. It's a great test runner in
25
+ its own right.</p>
24
26
  <a href="/guide/why" target="_blank" class="button w-fit mt-8 block lg:hidden">Learn more</a>
25
27
  </div>
26
28
  </div>
27
29
  </div>
28
30
  </template>
29
31
 
30
- <style scoped>
31
- </style>
32
+ <style scoped></style>
32
33
  <script setup lang="ts">
33
- </script>
34
+ </script>
package/src/oxc.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { VoidZeroTheme, themeContextKey } from "./";
2
+ import type { Theme } from "vitepress";
3
+
4
+ // inject project variant assets
5
+ import logoDark from "@assets/logos/oxc-dark.svg";
6
+ import logoLight from "@assets/logos/oxc-light.svg";
7
+ import footerBg from "@assets/oxc/footer-background.jpg";
8
+ import monoIcon from "@assets/icons/oxc-mono.svg";
9
+
10
+ export default {
11
+ ...VoidZeroTheme,
12
+ enhanceApp(ctx) {
13
+ ctx.app.provide(themeContextKey, {
14
+ logoDark,
15
+ logoLight,
16
+ logoAlt: "Vite",
17
+ footerBg,
18
+ monoIcon,
19
+ });
20
+ VoidZeroTheme.enhanceApp(ctx)
21
+ },
22
+ } satisfies Theme;
@@ -0,0 +1,22 @@
1
+ import { VoidZeroTheme, themeContextKey } from "./";
2
+ import type { Theme } from "vitepress";
3
+
4
+ // inject project variant assets
5
+ import logoDark from "@assets/logos/rolldown-dark.svg";
6
+ import logoLight from "@assets/logos/rolldown-light.svg";
7
+ import footerBg from "@assets/rolldown/footer-background.jpg";
8
+ import monoIcon from "@assets/icons/rolldown-mono.svg";
9
+
10
+ export default {
11
+ ...VoidZeroTheme,
12
+ enhanceApp(ctx) {
13
+ ctx.app.provide(themeContextKey, {
14
+ logoDark,
15
+ logoLight,
16
+ logoAlt: "Vite",
17
+ footerBg,
18
+ monoIcon,
19
+ });
20
+ VoidZeroTheme.enhanceApp(ctx)
21
+ },
22
+ } satisfies Theme;
@@ -0,0 +1,14 @@
1
+ export interface Sponsor {
2
+ name: string
3
+ img: string
4
+ url: string
5
+ hasDark?: true
6
+ }
7
+
8
+ export type SponsorSize = 'big' | 'medium' | 'small' | 'avatar'
9
+
10
+ export interface SponsorTier {
11
+ tier: string
12
+ size: SponsorSize
13
+ items: Sponsor[]
14
+ }
package/src/vite.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { VoidZeroTheme, themeContextKey } from "./";
2
+ import type { Theme } from "vitepress";
3
+
4
+ // inject project variant assets
5
+ import logoDark from "@assets/logos/vite-dark.svg";
6
+ import logoLight from "@assets/logos/vite-light.svg";
7
+ import footerBg from "@assets/vite/footer-background.jpg";
8
+ import monoIcon from "@assets/icons/vite-mono.svg";
9
+
10
+ export default {
11
+ ...VoidZeroTheme,
12
+ enhanceApp(ctx) {
13
+ ctx.app.provide(themeContextKey, {
14
+ logoDark,
15
+ logoLight,
16
+ logoAlt: "Vite",
17
+ footerBg,
18
+ monoIcon,
19
+ });
20
+ VoidZeroTheme.enhanceApp(ctx)
21
+ },
22
+ } satisfies Theme;
package/src/vitest.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { VoidZeroTheme, themeContextKey } from "./";
2
+ import type { Theme } from "vitepress";
3
+
4
+ // inject project variant assets
5
+ import logoDark from "@assets/logos/vitest-dark.svg";
6
+ import logoLight from "@assets/logos/vitest-light.svg";
7
+ import footerBg from "@assets/vitest/footer-background.jpg";
8
+ import monoIcon from "@assets/icons/vitest-mono.svg";
9
+
10
+ export default {
11
+ ...VoidZeroTheme,
12
+ enhanceApp(ctx) {
13
+ ctx.app.provide(themeContextKey, {
14
+ logoDark,
15
+ logoLight,
16
+ logoAlt: "Vite",
17
+ footerBg,
18
+ monoIcon,
19
+ });
20
+ VoidZeroTheme.enhanceApp(ctx)
21
+ },
22
+ } satisfies Theme;
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import RiveAnimation from "@components/shared/RiveAnimation.vue";
3
- import minifierAnimation from '@assets/oxc/animations/560_x_260_minifier.riv'
4
- </script>
5
-
6
- <template>
7
- <section id="feature-minifier" class="wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel">
8
-
9
- <div class="flex flex-col gap-3 justify-between py-10">
10
- <span class="text-grey text-xs font-mono uppercase tracking-wide px-10">Minifier <span class="text-aqua">(Alpha Build)</span></span>
11
- <RiveAnimation
12
- :desktop-src="minifierAnimation"
13
- :desktop-width="560"
14
- :desktop-height="260"
15
- canvas-class="w-full"
16
- />
17
- <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
18
- <h5 class="text-white">Optimize Compression</h5>
19
- <p class="max-w-[25rem] text-pretty">Minimize file sizes for fast delivery</p>
20
- </div>
21
- </div>
22
-
23
- <div class="flex flex-col gap-3 justify-between py-10">
24
- <span class="text-grey text-xs font-mono uppercase tracking-wide px-10">Formatter <span class="text-aqua">(Alpha Build)</span></span>
25
- <div class="flex-1 flex items-center justify-center px-5 sm:px-10">
26
- <img src="@assets/oxc/oxc-formatter-terminal.png" inert loading="lazy" alt="blazing-fast formatting" class="w-full object-contain [mask-image:linear-gradient(to_bottom,black_50%,transparent),linear-gradient(to_right,black_50%,transparent)] [mask-composite:intersect] [-webkit-mask-composite:source-in]">
27
- </div>
28
- <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
29
- <h5 class="text-white">Oxfmt: Blazing-Fast Formatting </h5>
30
- <p class="max-w-[26rem] text-pretty">Enforce consistent code styles</p>
31
- </div>
32
- </div>
33
-
34
- </section>
35
- </template>