Skip to content

Commit 8fbda92

Browse files
committed
docs(svite): add migration guide and document cli options
1 parent b28f3d6 commit 8fbda92

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

packages/svite/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# svite
22

3+
This is the new svite for vite2. It is still a work in progress. Feedback is welcome
4+
5+
Currently there is only one command for the cli to create new projects from templates.
6+
Unlike svite 0.8, it does not initialize git or install anything
7+
8+
## get started
9+
10+
```shell
11+
npx svite create my-svite-project
12+
cd my-svite-project
13+
npm install
14+
npm run dev
15+
npm run build
16+
```
17+
318
## cli
419

520
```shell
@@ -8,4 +23,30 @@ svite create --help
823
svite create my-svite-project
924
```
1025

26+
### svite create
27+
28+
```
29+
Usage:
30+
$ svite create [targetDir]
31+
32+
Options:
33+
--t, --template <string> template for new project. ["minimal","routify-mdsvex","windicss","preprocess-auto"] (default: minimal)
34+
--ts, --typescript enable typescript support for svelte (default: false)
35+
-f, --force force operation even if targetDir exists and is not empty (default: false)
36+
-d, --debug more verbose logging (default: false)
37+
-h, --help Display this message
38+
-v, --version Display version number
39+
```
40+
41+
# Migration from 0.8
42+
43+
- install vite@2 and @svitejs/vite-plugin-svelte
44+
- Update vite.config.js
45+
- use the pattern described in the [readme](packages/vite-plugin-svelte/README.md) of the new vite-plugin-svelte
46+
- remove old svite options
47+
- read vite2 documentation on https://vitejs.dev
48+
- add any svelte library you use to `optimizeDeps.exclude=[]` in vite.config
49+
- remove svite from dependencies
50+
- update package.json scripts to use `vite dev` and `vite build` instead of `svite dev` and `svite build`
51+
1152
# TODO more docs

0 commit comments

Comments
 (0)