Skip to content

Commit d6d9fc8

Browse files
authored
docs: update readme (#152)
1 parent 8ffd865 commit d6d9fc8

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# @sveltejs/vite-plugin-svelte
22

3+
[![npm version](https://img.shields.io/npm/v/@sveltejs/vite-plugin-svelte)](https://www.npmjs.com/package/svelte)
4+
[![CI](https://github.com/sveltejs/vite-plugin-svelte/actions/workflows/ci.yml/badge.svg)](https://github.com/sveltejs/vite-plugin-svelte/actions/workflows/ci.yml)
5+
[![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)
6+
37
The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev).
48

59
## Installation
@@ -30,9 +34,9 @@ export default defineConfig({
3034

3135
## Packages
3236

33-
| Package | changelog |
37+
| Package | Changelog |
3438
| ----------------------------------------------------------- | ----------------------------------------------------- |
35-
| [@sveltejs/vite-plugin-svelte](packages/vite-plugin-svelte) | [changelog](packages/vite-plugin-svelte/CHANGELOG.md) |
39+
| [@sveltejs/vite-plugin-svelte](packages/vite-plugin-svelte) | [Changelog](packages/vite-plugin-svelte/CHANGELOG.md) |
3640

3741
## Got a question? / Need help?
3842

docs/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns
118118

119119
### onwarn
120120

121-
- **Type:**: `(warning: Warning, defaultHandler?: (warning: Warning) => void) => void` - See [Warning](https://github.com/sveltejs/svelte/blob/ce550adef65a7e04c381b11c24f07a2ae1c25783/src/compiler/interfaces.ts#L121-L130)
121+
- **Type:** `(warning: Warning, defaultHandler?: (warning: Warning) => void) => void` - See [Warning](https://github.com/sveltejs/svelte/blob/ce550adef65a7e04c381b11c24f07a2ae1c25783/src/compiler/interfaces.ts#L121-L130)
122122

123123
Handles warning emitted from the Svelte compiler. Useful to suppress warning messages.
124124

packages/vite-plugin-svelte/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
The official [Svelte](https://svelte.dev) plugin for [Vite](https://vitejs.dev).
44

5+
## Usage
6+
7+
```js
8+
// vite.config.js
9+
import { svelte } from '@sveltejs/vite-plugin-svelte';
10+
11+
export default defineConfig({
12+
plugins: [
13+
svelte({
14+
/* plugin options */
15+
})
16+
]
17+
});
18+
```
19+
20+
## Documentation
21+
22+
- [Plugin options](../../docs/config.md)
23+
- [FAQ](../../docs/faq.md)
24+
525
## License
626

727
[MIT](./LICENSE)

packages/vite-plugin-svelte/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
},
3232
"repository": {
3333
"type": "git",
34-
"url": "git+https://github.com/sveltejs/vite-plugin-svelte.git"
34+
"url": "git+https://github.com/sveltejs/vite-plugin-svelte.git",
35+
"directory": "packages/vite-plugin-svelte"
3536
},
3637
"keywords": [
3738
"vite-plugin",
@@ -42,7 +43,7 @@
4243
"bugs": {
4344
"url": "https://github.com/sveltejs/vite-plugin-svelte/issues"
4445
},
45-
"homepage": "https://github.com/sveltejs/vite-plugin-svelte/tree/main/packages/vite-plugin-svelte#readme",
46+
"homepage": "https://github.com/sveltejs/vite-plugin-svelte#readme",
4647
"dependencies": {
4748
"@rollup/pluginutils": "^4.1.1",
4849
"debug": "^4.3.2",

0 commit comments

Comments
 (0)