@voidzero-dev/vitepress-theme 3.0.2 → 3.1.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.
package/config.js CHANGED
@@ -53,8 +53,17 @@ export function extendConfig(c) {
53
53
 
54
54
  // inject alias
55
55
  v.resolve ??= {};
56
- v.resolve.alias ??= {};
57
- Object.assign(v.resolve.alias, aliases);
56
+ const al = (v.resolve.alias ??= {});
57
+ if (Array.isArray(al)) {
58
+ for (const key in aliases) {
59
+ al.push({
60
+ find: key,
61
+ replacement: aliases[key]
62
+ })
63
+ }
64
+ } else {
65
+ Object.assign(v.resolve.alias, aliases);
66
+ }
58
67
 
59
68
  const pkg = "@voidzero-dev/vitepress-theme";
60
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vitepress-theme",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "description": "Shared VitePress theme for VoidZero projects",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <section id="feature-formatter" class="wrapper grid border-t md:grid-cols-2">
3
+ <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
4
+ <div class="flex flex-col gap-5">
5
+ <span class="text-grey text-xs font-mono uppercase tracking-wide">Formatter<span class="text-aqua"> (Alpha)</span></span>
6
+ <h4 class="text-white">Oxfmt: Prettier-compatible formatter</h4>
7
+ <p class="text-white/70 text-base max-w-[25rem] text-pretty">Enforce consistent code styles</p>
8
+ <ul class="checkmark-list">
9
+ <li>3x faster than <code class="mx-1 outline-none bg-nickel/50 text-aqua">Biome</code></li>
10
+ <li>35x faster than <code class="mx-1 outline-none bg-nickel/50 text-aqua">Prettier</code></li>
11
+ <li>Tailwind class sorting support</li>
12
+ </ul>
13
+ <a href="/docs/guide/usage/formatter" class="button w-fit mt-6">Usage Guide</a>
14
+ </div>
15
+ </div>
16
+ <div class="flex flex-col">
17
+ <div class="h-full overflow-clip flex justify-end items-center py-5 px-5 md:py-20 md:pl-10 md:pr-0">
18
+ <img loading="lazy" src="@assets/oxc/oxc-formatter-terminal.png" alt="Linter" class="[mask-image:linear-gradient(to_bottom,black_50%,transparent),linear-gradient(to_right,black_50%,transparent)] [mask-composite:intersect] [-webkit-mask-composite:source-in]">
19
+ </div>
20
+ </div>
21
+ </section>
22
+ </template>
23
+
24
+ <style scoped>
25
+ .card-bg {
26
+ background-image: url('@assets/oxc/oxc-feature-background.jpg');
27
+ background-size: cover;
28
+ background-position: center;
29
+ }
30
+ </style>
@@ -1,18 +1,15 @@
1
- <script setup lang="ts">
2
-
3
- </script>
4
-
5
1
  <template>
6
- <section id="feature-linter" class="wrapper border-t grid md:grid-cols-2">
2
+ <section id="feature-linter" class="wrapper grid md:grid-cols-2">
7
3
  <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
8
4
  <div class="flex flex-col gap-5">
9
5
  <span class="text-grey text-xs font-mono uppercase tracking-wide">Linter</span>
10
- <h4 class="text-white">Oxlint: The Rust-powered linter</h4>
6
+ <h4 class="text-white">Oxlint: ESLint-compatible linter</h4>
11
7
  <p class="text-white/70 text-base max-w-[25rem] text-pretty">Catch bugs before they make it to production</p>
12
8
  <ul class="checkmark-list">
13
9
  <li>50~100x faster than <code class="mx-1 outline-none bg-nickel/50 text-aqua">ESLint</code></li>
14
10
  <li>570+ rules and growing</li>
15
- <li>Type-aware Linting</li>
11
+ <li>True type-aware Linting powered by <code class="mx-1 outline-none bg-nickel/50 text-aqua">tsgo</code></li>
12
+ <li>Support for <code class="mx-1 outline-none bg-nickel/50 text-aqua">ESLint</code> JS Plugins</li>
16
13
  </ul>
17
14
  <a href="/docs/guide/usage/linter" class="button w-fit mt-6">Usage Guide</a>
18
15
  </div>
@@ -31,4 +28,4 @@
31
28
  background-size: cover;
32
29
  background-position: center;
33
30
  }
34
- </style>
31
+ </style>
@@ -0,0 +1,26 @@
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 border-t grid md:grid-cols-2">
8
+ <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
9
+ <div class="flex flex-col gap-5">
10
+ <span class="text-grey text-xs font-mono uppercase tracking-wide">Minifier <span class="text-aqua">(Alpha)</span></span>
11
+ <h4 class="text-white">oxc-minify</h4>
12
+ <p class="text-white/70 text-base max-w-[25rem] text-pretty">Compress and optimize</p>
13
+ <ul class="checkmark-list">
14
+ <li>Dead code elimination</li>
15
+ <li>Syntax shortening & whitespace removal</li>
16
+ <li>Variable name mangling</li>
17
+ </ul>
18
+ <a href="/docs/guide/usage/minifier" class="button w-fit mt-6">Usage Guide</a>
19
+ </div>
20
+ </div>
21
+ <div class="flex flex-col py-10">
22
+ <RiveAnimation :desktop-src="minifierAnimation" :desktop-width="560" :desktop-height="260"
23
+ canvas-class="w-full" />
24
+ </div>
25
+ </section>
26
+ </template>
@@ -5,52 +5,53 @@ import parserBenchmarkBg from '@assets/oxc/oxc-feature-background.jpg';
5
5
  const performanceData = [
6
6
  {
7
7
  name: 'OXC',
8
- percentage: 18,
9
- time: '60ms',
8
+ percentage: 20,
9
+ time: '26.3ms',
10
10
  isPrimary: true
11
11
  },
12
12
  {
13
13
  name: 'SWC',
14
14
  percentage: 65,
15
- time: '210ms'
15
+ time: '84.1ms'
16
16
  },
17
17
  {
18
18
  name: 'Biome',
19
19
  percentage: 100,
20
- time: '325ms'
20
+ time: '130.1ms'
21
21
  }
22
22
  ]
23
23
  </script>
24
24
 
25
25
  <template>
26
- <section id="feature-parser" class="wrapper grid md:grid-cols-2">
27
- <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
26
+ <section id="feature-parser" class="wrapper grid border-t md:grid-cols-2">
27
+ <div class="px-5 py-6 md:p-10 md:py-15 flex flex-col justify-center gap-15">
28
28
  <div class="flex flex-col gap-5">
29
29
  <span class="text-grey text-xs font-mono uppercase tracking-wide">Parser</span>
30
- <h4 class="text-white">Quick AST generation</h4>
31
- <p class="text-white/70 text-base max-w-[25rem] text-pretty">The perfect input for advanced transformations and compilations</p>
30
+ <h4 class="text-white">oxc-parser</h4>
31
+ <p class="text-white/70 text-base max-w-100 text-pretty">The foundation for advanced transformations and
32
+ compilations</p>
32
33
  <ul class="checkmark-list">
33
34
  <li>3x faster than <code class="mx-1 outline-none bg-nickel/50 text-aqua">SWC</code></li>
34
- <li>All Test262 stage4 tests passed</li>
35
+ <li>Parses <code class="mx-1 outline-none bg-nickel/50 text-aqua">.js(x)</code> and <code class="mx-1 outline-none bg-nickel/50 text-aqua">.ts(x)</code></li>
36
+ <li>Passes all Test262 stage4 tests</li>
35
37
  </ul>
36
38
  <a href="/docs/guide/usage/parser" class="button w-fit mt-6">Usage Guide</a>
37
39
  </div>
38
40
  </div>
39
- <div class="flex flex-col justify-center px-5 md:px-10 py-5 md:pb-10 md:py-20">
40
- <p class="text-white font-medium mb-10">Parser Benchmark for Oxc, Swc and Biome</p>
41
+ <div class="flex flex-col justify-center px-5 md:px-10 py-5 md:pb-10 md:py-10">
42
+ <p class="text-white font-medium mb-10">
43
+ Parser Benchmark for Oxc, Swc and Biome
44
+ </p>
41
45
  <div class="flex flex-col gap-6">
42
- <PerformanceBar
43
- v-for="item in performanceData"
44
- :key="item.name"
45
- :data="item"
46
- :background-image="parserBenchmarkBg"
47
- large
48
- />
46
+ <PerformanceBar v-for="item in performanceData" :key="item.name" :data="item"
47
+ :background-image="parserBenchmarkBg" large />
49
48
  </div>
49
+ <p class="text-xs mt-10">
50
+ Parsing typescript.js on Macbook Pro M3 Max |
51
+ <a href="https://github.com/oxc-project/bench-javascript-parser-written-in-rust" target="_blank">Source</a>
52
+ </p>
50
53
  </div>
51
54
  </section>
52
55
  </template>
53
56
 
54
- <style scoped>
55
-
56
- </style>
57
+ <style scoped></style>
@@ -7,10 +7,15 @@
7
7
  <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
8
8
  <div class="flex flex-col gap-5">
9
9
  <span class="text-grey text-xs font-mono uppercase tracking-wide">Resolver</span>
10
- <h4 class="text-white">Speedy module resolution</h4>
11
- <p class="text-white/70 text-base max-w-[25rem] text-pretty">Ensure your dependencies are located correctly and instantly</p>
10
+ <h4 class="text-white">oxc-resolver</h4>
11
+ <p class="text-white/70 text-base max-w-[25rem] text-pretty">Node.js-compatible CJS and ESM module resolution
12
+ </p>
12
13
  <ul class="checkmark-list">
13
- <li>28x faster than enhanced-resolve</li>
14
+ <li>Behavior alignment with <code
15
+ class="mx-1 outline-none bg-nickel/50 text-aqua">enhanced-resolve</code></li>
16
+ <li>28x faster than <code class="mx-1 outline-none bg-nickel/50 text-aqua">enhanced-resolve</code>
17
+ <li>Highly customizable</li>
18
+ </li>
14
19
  </ul>
15
20
  <a href="/docs/guide/usage/resolver" class="button w-fit mt-6">Usage Guide</a>
16
21
  </div>
@@ -21,4 +26,4 @@
21
26
  </div>
22
27
  </div>
23
28
  </section>
24
- </template>
29
+ </template>
@@ -2,11 +2,12 @@
2
2
  import { ref, onMounted, onUnmounted } from 'vue'
3
3
 
4
4
  const features = [
5
- { id: 'feature-parser', label: 'parser' },
6
5
  { id: 'feature-linter', label: 'linter' },
7
- { id: 'feature-resolver', label: 'resolver' },
6
+ { id: 'feature-formatter', label: 'formatter' },
7
+ { id: 'feature-parser', label: 'parser' },
8
8
  { id: 'feature-transformer', label: 'transformer' },
9
- { id: 'feature-minifier', label: 'minifier + formatter' },
9
+ { id: 'feature-resolver', label: 'resolver' },
10
+ { id: 'feature-minifier', label: 'minifier' },
10
11
  ]
11
12
 
12
13
  const activeSection = ref('feature-parser')
@@ -42,8 +43,8 @@ const scrollToSection = (e: Event, id: string) => {
42
43
 
43
44
  // Easing function (easeInOutCubic)
44
45
  const ease = progress < 0.5
45
- ? 4 * progress * progress * progress
46
- : 1 - Math.pow(-2 * progress + 2, 3) / 2
46
+ ? 4 * progress * progress * progress
47
+ : 1 - Math.pow(-2 * progress + 2, 3) / 2
47
48
 
48
49
  window.scrollTo(0, startPosition + distance * ease)
49
50
 
@@ -164,18 +165,13 @@ onUnmounted(() => {
164
165
  <template>
165
166
  <div class="wrapper wrapper wrapper--ticks border-t w-full relative z-20"></div>
166
167
  <section class="wrapper sticky top-0 border-b bg-primary z-10 overflow-hidden">
167
- <ul class="w-full sm:grid sm:grid-cols-5 flex items-center divide-x divide-nickel relative overflow-x-auto scrollbar-hide touch-none sm:touch-auto select-none sm:select-auto">
168
- <div
169
- class="absolute bottom-0 h-0.5 bg-white transition-all duration-300 ease-out"
170
- :style="underlineStyle"
171
- />
168
+ <ul
169
+ class="w-full sm:grid sm:grid-cols-6 flex items-center divide-x divide-nickel relative overflow-x-auto scrollbar-hide touch-none sm:touch-auto select-none sm:select-auto">
170
+ <div class="absolute bottom-0 h-0.5 bg-white transition-all duration-300 ease-out" :style="underlineStyle" />
172
171
  <li v-for="(feature, _index) in features" :key="feature.id" ref="listItems" class="flex-shrink-0">
173
- <a
174
- :href="`#${feature.id}`"
175
- @click="scrollToSection($event, feature.id)"
176
- class="h-full text-sm font-mono tracking-tight py-4 px-6 sm:px-0 flex justify-center gap-1.5 transition-colors duration-200 whitespace-nowrap"
177
- :class="activeSection === feature.id ? 'text-white' : 'text-grey'"
178
- >
172
+ <a :href="`#${feature.id}`" @click="scrollToSection($event, feature.id)"
173
+ class="h-full text-sm font-mono tracking-tight py-4 px-6 sm:px-0 flex justify-center gap-1.5 transition-colors duration-200 whitespace-nowrap"
174
+ :class="activeSection === feature.id ? 'text-white' : 'text-grey'">
179
175
  <span>{{ feature.label }}</span>
180
176
  </a>
181
177
  </li>
@@ -191,7 +187,9 @@ onUnmounted(() => {
191
187
 
192
188
  /* Hide scrollbar for IE, Edge and Firefox */
193
189
  .scrollbar-hide {
194
- -ms-overflow-style: none; /* IE and Edge */
195
- scrollbar-width: none; /* Firefox */
190
+ -ms-overflow-style: none;
191
+ /* IE and Edge */
192
+ scrollbar-width: none;
193
+ /* Firefox */
196
194
  }
197
- </style>
195
+ </style>
@@ -7,19 +7,20 @@
7
7
  <div class="px-5 py-6 md:p-10 flex flex-col justify-center gap-15">
8
8
  <div class="flex flex-col gap-5">
9
9
  <span class="text-grey text-xs font-mono uppercase tracking-wide">Transformer</span>
10
- <h4 class="text-white">Instant JavaScript transformation</h4>
11
- <p class="text-white/70 text-base max-w-[25rem] text-pretty">Transpile the code you need</p>
10
+ <h4 class="text-white">oxc-transform</h4>
11
+ <p class="text-white/70 text-base max-w-[25rem] text-pretty">Transpile source code at the speed of thought</p>
12
12
  <ul class="checkmark-list">
13
- <li><code class="mx-1 outline-none bg-nickel/50 text-aqua">Babel</code> compatible</li>
14
- <li><code class="mx-1 outline-none bg-nickel/50 text-aqua">TypeScript</code> / <code
15
- class="mx-1 outline-none bg-nickel/50 text-aqua">React JSX</code></li>
13
+ <li><code class="mx-1 outline-none bg-nickel/50 text-aqua">TypeScript</code> & <code
14
+ class="mx-1 outline-none bg-nickel/50 text-aqua">JSX</code></li>
15
+ <li>Syntax lowering to ES2015</li>
16
16
  <li>Isolated Declarations DTS Emit</li>
17
+ <li>React Fast Refresh, styled-components, and more</li>
17
18
  </ul>
18
19
  <a href="/docs/guide/usage/transformer" class="button w-fit mt-6">Usage Guide</a>
19
20
  </div>
20
21
  </div>
21
22
  <div class="flex flex-col">
22
- <div class="card-bg h-full overflow-clip flex justify-end items-center py-20 px-5 md:px-20">
23
+ <div class="card-bg h-full overflow-clip flex justify-end items-center py-5 md:py-10 px-5 md:px-25">
23
24
  <img loading="lazy" src="@assets/oxc/oxc-transformer-terminal.png" alt="Transformer" class="w-full md:w-auto">
24
25
  </div>
25
26
  </div>
@@ -32,4 +33,4 @@
32
33
  background-size: cover;
33
34
  background-position: center;
34
35
  }
35
- </style>
36
+ </style>
@@ -12,7 +12,7 @@ import oxcAnimation from '@assets/oxc/animations/640_x_630_oxc masthead_.riv'
12
12
  <img src="@assets/logos/voidzero-light.svg" alt="VoidZero" class="h-2.5">
13
13
  </div>
14
14
  <h1 class="text-white text-pretty">The JavaScript Oxidation Compiler</h1>
15
- <p class="text-white/70 text-lg max-w-[25rem] text-pretty">A collection of JavaScript tools written in Rust</p>
15
+ <p class="text-white/70 text-lg max-w-[25rem] text-pretty">A collection of high-performance JavaScript tools written in Rust</p>
16
16
  <div class="flex items-center gap-5 mt-8">
17
17
  <a href="/docs/guide/introduction" class="button button--primary inline-block w-fit">
18
18
  Get Started
@@ -24,7 +24,7 @@ import oxcAnimation from '@assets/oxc/animations/640_x_630_oxc masthead_.riv'
24
24
  </div>
25
25
  </div>
26
26
  <div class="flex flex-col min-h-[22rem] sm:min-h-[30rem]">
27
- <div class="relative px-10 h-full flex flex-col justify-center overflow-clip py-10 sm:py-0">
27
+ <div class="relative px-10 h-full flex flex-col justify-center overflow-clip pb-10 sm:pb-0">
28
28
  <RiveAnimation
29
29
  :desktop-src="oxcAnimation"
30
30
  :mobile-src="oxcAnimation"
@@ -41,4 +41,4 @@ import oxcAnimation from '@assets/oxc/animations/640_x_630_oxc masthead_.riv'
41
41
 
42
42
  <style scoped>
43
43
 
44
- </style>
44
+ </style>
@@ -7,29 +7,24 @@ import performanceBarBg from '@assets/rolldown/rolldown-rollup-background.jpg';
7
7
  const performanceData = [
8
8
  {
9
9
  name: 'Rolldown',
10
- percentage: 20,
11
- time: '0.63s',
10
+ percentage: 4.01,
11
+ time: '1.61s',
12
12
  isPrimary: true
13
13
  },
14
14
  {
15
15
  name: 'esbuild',
16
- percentage: 39,
17
- time: '1.23s'
16
+ percentage: 4.24,
17
+ time: '1.70s'
18
18
  },
19
19
  {
20
- name: 'Rolldown-Vite',
21
- percentage: 47,
22
- time: '1.49s'
20
+ name: 'rspack',
21
+ percentage: 10.15,
22
+ time: '4.07s',
23
23
  },
24
24
  {
25
- name: 'Farm',
26
- percentage: 66,
27
- time: '2.08s'
28
- },
29
- {
30
- name: 'Rsbuild',
25
+ name: 'Rollup + esbuild',
31
26
  percentage: 100,
32
- time: '3.14s'
27
+ time: '40.10s'
33
28
  }
34
29
  ]
35
30
  </script>
@@ -37,54 +32,55 @@ const performanceData = [
37
32
  <template>
38
33
  <section class="wrapper wrapper--ticks border-t grid lg:grid-cols-2 divide-x divide-y divide-nickel">
39
34
  <div class="flex flex-col gap-3 justify-between">
40
- <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
35
+ <div class="p-5 sm:p-15 pb-0 sm:pb-0 flex flex-col gap-3">
41
36
  <h5 class="text-balance sm:text-pretty text-white">Speed of Rust</h5>
42
- <p class="sm:max-w-[28rem] text-pretty">Rolldown handles tens of thousands of modules without breaking a sweat</p>
37
+ <p class="sm:max-w-[30rem] text-pretty">Rolldown handles tens of thousands of modules without breaking a sweat
38
+ </p>
43
39
  </div>
44
- <div class="p-5 sm:p-10 flex flex-col gap-10">
40
+ <div class="p-5 sm:p-15 flex flex-col gap-10">
45
41
  <div class="flex flex-col gap-4">
46
- <PerformanceBar
47
- v-for="item in performanceData"
48
- :key="item.name"
49
- :data="item"
50
- :background-image="performanceBarBg"
51
- />
42
+ <PerformanceBar v-for="item in performanceData" :key="item.name" :data="item"
43
+ :background-image="performanceBarBg" />
52
44
  </div>
53
45
  <div>
54
- <p class="text-sm"><span class="text-white font-medium">Benchmark</span> bundling <span class="text-white font-medium">19k</span> modules.</p>
55
- <p class="text-xs">10k React JSX components + 9k iconify JS files</p>
46
+ <p class="text-sm"><a
47
+ href="https://github.com/rolldown/benchmarks/tree/f3997c801b7d261e8aaa15d4affbf6730cc19884?tab=readme-ov-file#ubuntu-latest-updated-2025-12-21"
48
+ target="_blank" class="text-white font-medium">Benchmark</a> bundling <span
49
+ class="text-white font-medium">19k</span>
50
+ modules.</p>
51
+ <p class="text-xs">10k React JSX components + 9k iconify JS files, with minification and source maps.</p>
56
52
  </div>
57
53
  </div>
58
54
  </div>
59
- <div class="flex flex-col gap-3 border-r-0 justify-between">
60
- <div class="p-5 sm:p-10 flex flex-col gap-3">
55
+
56
+ <div class="flex flex-col gap-3 border-r-0 justify-between overflow-hidden">
57
+ <div class="p-5 sm:p-15 sm:pb-10 flex flex-col gap-3">
61
58
  <h5 class="text-white">Rollup Compatible</h5>
62
- <p class="max-w-[26rem] text-pretty">Familiar API & options with a rich plugin ecosystem</p>
59
+ <p class="max-w-[30rem] text-pretty">Familiar API & options with a rich plugin ecosystem</p>
63
60
  </div>
64
61
  <div class="card-bg px-5 sm:px-20 pt-5 sm:pt-10 flex justify-center">
65
- <img src="@assets/rolldown/rolldown-rollup.png" inert loading="lazy" alt="rollup compatible">
62
+ <img src="@assets/rolldown/rolldown-rollup.png" class="-mb-[60px]" inert loading="lazy" alt="rollup compatible">
66
63
  </div>
67
64
  </div>
65
+
68
66
  <div class="flex flex-col gap-3 justify-between">
69
- <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
67
+ <div class="p-5 sm:p-15 pb-0 sm:pb-0 flex flex-col gap-3">
70
68
  <h5 class="text-white">Esbuild Feature Parity</h5>
71
69
  <p class="max-w-[26rem] text-pretty">Built-in transforms, define, inject, minify, CSS bundling & more...</p>
72
70
  </div>
73
- <div class="flex-1 flex items-center justify-center p-5 sm:p-10">
74
- <img src="@assets/rolldown/rolldown-esbuild-parity.png" inert loading="lazy" alt="jest compatible" class="w-full max-h-60 object-contain">
71
+ <div class="flex-1 flex items-center justify-center p-8 sm:p-15 sm:pt-10">
72
+ <img src="@assets/rolldown/rolldown-esbuild-parity.png" inert loading="lazy" alt="jest compatible"
73
+ class="w-full max-h-60 object-contain">
75
74
  </div>
76
75
  </div>
76
+
77
77
  <div class="flex flex-col gap-3 justify-between">
78
- <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
78
+ <div class="p-5 sm:p-15 pb-0 sm:pb-0 flex flex-col gap-3">
79
79
  <h5 class="text-white">Designed for Vite</h5>
80
80
  <p class="max-w-[25rem] text-pretty">The unified bundler powering Vite 8+</p>
81
81
  </div>
82
- <RiveAnimation
83
- :desktop-src="vitePoweredAnimation"
84
- :desktop-width="640"
85
- :desktop-height="300"
86
- canvas-class="w-full mb-10"
87
- />
82
+ <RiveAnimation :desktop-src="vitePoweredAnimation" :desktop-width="640" :desktop-height="300"
83
+ canvas-class="w-full mb-10" />
88
84
  </div>
89
85
  </section>
90
86
  </template>
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="wrapper wrapper--ticks grid md:grid-cols-2 w-full border-nickel divide-x">
3
3
  <div class="flex flex-col p-10 justify-between items-center md:items-start">
4
- <div class="flex flex-col gap-5 max-w-[30rem] text-center md:text-left items-center md:items-start">
4
+ <div class="flex flex-col gap-5 text-center md:text-left items-center md:items-start">
5
5
  <div class="flex items-center gap-2">
6
6
  <span class="text-grey text-xs font-mono uppercase tracking-wide">By</span>
7
7
  <img src="@assets/logos/voidzero-light.svg" alt="VoidZero" class="h-2.5">
8
8
  </div>
9
- <h1 class="text-white text-pretty">Fast Rust-based bundler for JavaScript</h1>
10
- <p class="text-white/70 text-lg max-w-[25rem] text-pretty">with Rollup-compatible API</p>
9
+ <h1 class="text-white text-pretty max-w-[35rem]">Blazing Fast<br>Rust-based bundler for JavaScript</h1>
10
+ <p class="text-white/70 text-lg max-w-[30rem] text-pretty">with Rollup-compatible API and esbuild feature parity</p>
11
11
  <div class="flex items-center gap-5 mt-6">
12
12
  <a href="/guide/" class="button button--primary inline-block w-fit">
13
13
  <span>Get Started</span>
@@ -54,4 +54,4 @@
54
54
  }
55
55
  </style>
56
56
  <script setup lang="ts">
57
- </script>
57
+ </script>
@@ -9,7 +9,8 @@ import esmAnimation from '@assets/vitest/animations/640_x_300_esm.riv'
9
9
  <div class="flex flex-col gap-3">
10
10
  <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
11
11
  <h5 class="text-balance sm:text-pretty text-white">Vite Powered</h5>
12
- <p class="sm:max-w-[28rem] text-pretty">Reuse Vite's config and plugins - consistent across your app and tests.
12
+ <p class="sm:max-w-[30rem] text-pretty">Reuse <code
13
+ class="mr-1 outline-none bg-nickel/50 text-vite">Vite</code>'s config and plugins - consistent across your app and tests.
13
14
  But it's not required to use Vitest!</p>
14
15
  </div>
15
16
  <RiveAnimation
@@ -22,7 +23,8 @@ import esmAnimation from '@assets/vitest/animations/640_x_300_esm.riv'
22
23
  <div class="flex flex-col gap-3 border-r-0 justify-between">
23
24
  <div class="p-5 sm:p-10 pb-0 sm:pb-0 flex flex-col gap-3">
24
25
  <h5 class="text-white">Jest Compatible</h5>
25
- <p class="max-w-[26rem] text-pretty">Expect, snapshot, coverage, and more - migrating from Jest is
26
+ <p class="max-w-[28rem] text-pretty">Expect, snapshot, coverage, and more - migrating from <code
27
+ class="mr-1 outline-none bg-nickel/50 text-zest">Jest</code> is
26
28
  straightforward.</p>
27
29
  </div>
28
30
  <div class="flex-1 flex items-center justify-center p-5 sm:p-10">
@@ -32,7 +34,7 @@ import esmAnimation from '@assets/vitest/animations/640_x_300_esm.riv'
32
34
  <div class="flex flex-col gap-3 justify-between">
33
35
  <div class="p-5 sm:p-10 flex flex-col gap-3">
34
36
  <h5 class="text-white">Smart & instant watch mode</h5>
35
- <p class="max-w-[26rem] text-pretty">Only rerun the related changes, just like HMR for tests!</p>
37
+ <p class="max-w-[23rem] text-pretty">Only rerun the related changes, just like HMR for tests!</p>
36
38
  </div>
37
39
  <div class="card-bg px-5 sm:px-10 pt-5 sm:pt-10 flex justify-center">
38
40
  <img src="@assets/vitest/vitest-watcher.png" inert loading="lazy" alt="typed api">
@@ -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;
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>