Skip to content

Commit ffb9928

Browse files
docs: vitest docs final drafting and home page logo tweaks and labels
1 parent 93eb733 commit ffb9928

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

src/assets/vitest.svg

Lines changed: 1 addition & 1 deletion
Loading

src/components/build-with-friends/build-with-friends.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,19 @@ export default class BuildWithFriends extends HTMLElement {
3535
</span>
3636
<span class="${styles.icon}">
3737
<span>${wtrIcon}</span>
38-
<span>Web Test Runner</span>
38+
<span class="${styles.iconLabel}">Web Test Runner</span>
3939
</span>
4040
<span class="${styles.icon}">
41-
${wccIcon}
41+
<span>${wccIcon}</span>
42+
<span class="${styles.iconLabel}">WC Compiler</span>
4243
</span>
4344
<span class="${styles.icon}">
4445
<span>${openPropsIcon}</span>
45-
<span>Open Props</span>
46+
<span class="${styles.iconLabel}">Open Props</span>
4647
</span>
4748
<span class="${styles.icon}">
48-
${vitestIcon}
49+
<span>${vitestIcon}</span>
50+
<span class="${styles.iconLabel}">Vitest</span>
4951
</span>
5052
</div>
5153
</div>

src/components/build-with-friends/build-with-friends.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
display: inline-block;
3636
}
3737

38+
.iconLabel {
39+
padding-left: var(--size-1);
40+
}
41+
3842
@media (min-width: 600px) {
3943
.icon {
4044
display: inline-block;

src/pages/guides/ecosystem/storybook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ We were not able to detect the right builder for your project. Please select one
4747
Webpack 5
4848
```
4949
50-
> See our Vitest docs for additional configuration examples to support [Import Attributes](/guides/ecosystem/vitest/#import-attributes) and [Greenwood resource plugins](/guides/ecosystem/vitest/#resource-plugins) usage in your components. For this guide, you'll be updating a _vite.config.js_ file instead.
50+
> See our Vitest docs for additional configuration examples to support [Import Attributes](/guides/ecosystem/vitest/#import-attributes) and [Greenwood resource plugins](/guides/ecosystem/vitest/#resource-plugins) usage in your components. For that guide, you'll be updating a _vite.config.js_ file instead.
5151
5252
## Usage
5353

src/pages/guides/ecosystem/vitest.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tocHeading: 2
1414

1515
> At time of writing, this guide was based on Vitest v4.x and Vite v7.x.
1616
17-
Install Vite and Vitest:
17+
First, install Vite and Vitest:
1818

1919
<!-- prettier-ignore-start -->
2020

@@ -56,13 +56,13 @@ Next, let's create a _vitest.config.js_ file and configure the location of our t
5656

5757
<!-- prettier-ignore-end -->
5858

59-
Lastly, let's create some NPM scripts to run our tests. By default, vitest will run in watch mode which is great for TDD (Test Driven Development).
59+
Lastly, let's create some NPM scripts to run your tests. By default, Vitest will run in watch mode which is great for TDD (Test Driven Development).
6060

61-
Below is an example of how to setup NPM scripts for development:
61+
Below is an example of how to setup NPM scripts for testing:
6262

6363
<!-- prettier-ignore-start -->
6464

65-
<app-ctc-block variant="snippet">
65+
<app-ctc-block variant="snippet" heading="package.json">
6666

6767
```json
6868
{
@@ -99,7 +99,7 @@ The best way to test Web Components is in a browser. For this guide, we will use
9999

100100
<!-- prettier-ignore-end -->
101101

102-
Then install Playwright
102+
Then install Playwright:
103103

104104
<!-- prettier-ignore-start -->
105105

@@ -141,7 +141,7 @@ Then in our _vitest.config.js_ file, let's add configuration for Playwright:
141141

142142
<!-- prettier-ignore-end -->
143143

144-
> Note: For CI environments like GitHub Actions, you'll want to add a step for install Playwright include deps
144+
> Note: For CI environments like GitHub Actions, you'll want to add a step for installing Playwright, including the [`--with-deps` flag](https://playwright.dev/docs/ci):
145145
>
146146
> ```shell
147147
> npx playwright install --with-deps
@@ -225,7 +225,7 @@ You should now be good to start writing your first test! ⚡
225225

226226
## Import Attributes
227227

228-
As [Vite does not support Import Attributes](https://github.com/vitejs/vite/issues/14674), we will need to update our _vitest.config.js_ file and write a [custom plugin](https://vitejs.dev/guide/api-plugin) to work around this.
228+
As [Vite does not support Import Attributes](https://github.com/vitejs/vite/issues/14674), you will need to update your _vitest.config.js_ file and write a [custom plugin](https://vitejs.dev/guide/api-plugin) to work around this.
229229

230230
In this example we are handling for CSS Module scripts:
231231

@@ -302,7 +302,7 @@ Phew, should be all set now.
302302
303303
## Resource Plugins
304304
305-
If you're using one of Greenwood's [resource plugins](/docs/plugins/), you'll want to update the _vitest.config.js_ file so we can create a custom transformation plugin that can leverage Greenwood's plugins to automatically handle custom transformations.
305+
If you're using one of Greenwood's [resource plugins](/docs/plugins/), you'll want to update the _vitest.config.js_ file with a plugin that can leverage Greenwood's plugins to automatically handle custom transformations.
306306
307307
For example, if you're using Greenwood's [Raw Plugin](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-import-raw), you'll need to create a wrapping Vite plugin to handle this transformation.
308308

0 commit comments

Comments
 (0)