Skip to content

Commit d9686d3

Browse files
committed
docs: update readme
1 parent a0c7c65 commit d9686d3

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ yarn add vite-userscript-plugin -D
2828
pnpm add vite-userscript-plugin -D
2929
```
3030

31-
## Usage
32-
33-
### `vite.config.ts`
31+
### Setup `vite.config.ts`
3432

3533
```js
3634
import { defineConfig } from 'vite'
@@ -45,21 +43,21 @@ export default defineConfig((config) => {
4543
header: {
4644
name,
4745
version,
48-
match: [
49-
'*://example.com',
50-
'*://example.org',
51-
'*://example.edu'
52-
]
46+
match: '*://example.com'
47+
},
48+
server: {
49+
port: 3000
5350
}
5451
})
5552
]
5653
}
5754
})
5855
```
5956

60-
### `package.json`
57+
### Setup scripts
6158

6259
```json
60+
// package.json
6361
{
6462
"scripts": {
6563
"dev": "vite build --watch --mode development",
@@ -68,15 +66,14 @@ export default defineConfig((config) => {
6866
}
6967
```
7068

71-
### `tsconfig.json`
69+
### Setup TypeScript
7270

7371
```json
72+
// tsconfig.json
7473
{
7574
"compilerOptions": {
7675
"types": [
77-
"vite-userscript-plugin/types/tampermonkey",
78-
// "vite-userscript-plugin/types/greasemonkey",
79-
// "vite-userscript-plugin/types/violentmonkey"
76+
"vite-userscript-plugin/types/tampermonkey"
8077
]
8178
}
8279
}

0 commit comments

Comments
 (0)