Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Dec 18, 2023
1 parent 8e82133 commit d82f2c8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@
> This is a development branch for stylex vite plugin. Each feature will be pass in the repo.
> This is an unofficial repo.
## Features

- [x] SSR
- [x] automatic injection
- [x] HMR

## Usage

Clone repo and install all dependencies then run `yarn build` and copy the dist directroy to your project.

```ts
import { defineConfig } from "vite";
import { stylexPlugin } from "vite-plugin-stylex";

export default defineConfig({
plugins: [stylexPlugin()],
});
```

## Options

| params | type | default | description |
Expand Down
8 changes: 4 additions & 4 deletions e2e/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { createSSRServer } from './fixtures/vue-ssr/server'
// }, [windowHandle, elementHandle])
// t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red')
// await elementHandle.click()
// await new Promise((resolve) => setTimeout(resolve, 2000))
// await new Promise((resolve) => setTimeout(resolve, 5000))
// const blue = await page.evaluate(([window, el]) => {
// return (window as Window).getComputedStyle(el as Element).color
// }, [windowHandle, elementHandle])
Expand All @@ -31,7 +31,7 @@ test('fixture spa', async (t) => {
}, [windowHandle, elementHandle])
t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red')
await elementHandle.click()
await new Promise((resolve) => setTimeout(resolve, 2000))
await new Promise((resolve) => setTimeout(resolve, 5000))
const blue = await page.evaluate(([window, el]) => {
return (window as Window).getComputedStyle(el as Element).color
}, [windowHandle, elementHandle])
Expand All @@ -48,7 +48,7 @@ test('fixture qwik', async (t) => {
}, [windowHandle, elementHandle])
t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red')
await elementHandle.click()
await new Promise((resolve) => setTimeout(resolve, 2000))
await new Promise((resolve) => setTimeout(resolve, 5000))
const blue = await page.evaluate(([window, el]) => {
return (window as Window).getComputedStyle(el as Element).color
}, [windowHandle, elementHandle])
Expand All @@ -65,7 +65,7 @@ test('fixture vue ssr', async (t) => {
}, [windowHandle, elementHandle])
t.is(red, 'rgb(255, 0, 0)', 'first load spa button text color should be red')
await elementHandle.click()
await new Promise((resolve) => setTimeout(resolve, 2000))
await new Promise((resolve) => setTimeout(resolve, 5000))
const blue = await page.evaluate(([window, el]) => {
return (window as Window).getComputedStyle(el as Element).color
}, [windowHandle, elementHandle])
Expand Down

0 comments on commit d82f2c8

Please sign in to comment.