Update frontend/README.md
This commit is contained in:
parent
c40c245ce6
commit
51fd07d4fa
|
@ -1,40 +1,49 @@
|
||||||
# cista-front
|
# Cista Vue Frontend
|
||||||
|
|
||||||
This template should help get you started developing with Vue 3 in Vite.
|
The frontend is a Single-Page App implemented with Vue 3. Development uses the Vite server together with the main Python backend, but in production the latter also serves the prebuilt frontend files.
|
||||||
|
|
||||||
## Recommended IDE Setup
|
```fish
|
||||||
|
npm install
|
||||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
npm run dev
|
||||||
|
```
|
||||||
## Type Support for `.vue` Imports in TS
|
|
||||||
|
## Recommended IDE Setup
|
||||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
||||||
|
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||||
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
||||||
|
## Type Support for `.vue` Imports in TS
|
||||||
1. Disable the built-in TypeScript Extension
|
|
||||||
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
||||||
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
||||||
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
||||||
|
|
||||||
## Customize configuration
|
1. Disable the built-in TypeScript Extension
|
||||||
|
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
||||||
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
||||||
|
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
||||||
## Project Setup
|
|
||||||
|
## Customize configuration
|
||||||
```sh
|
|
||||||
npm install
|
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||||
```
|
|
||||||
|
## Project Setup
|
||||||
### Compile and Hot-Reload for Development
|
|
||||||
|
```sh
|
||||||
```sh
|
npm install
|
||||||
npm run dev
|
```
|
||||||
```
|
|
||||||
|
### Compile and Hot-Reload for Development
|
||||||
### Type-Check, Compile and Minify for Production
|
|
||||||
|
```sh
|
||||||
```sh
|
npm run dev
|
||||||
npm run build
|
```
|
||||||
```
|
|
||||||
|
Note: you need to run the `cista --dev -l :8000` backend server, where Vite will forward the API requests, concurrently in another terminal.
|
||||||
|
|
||||||
|
### Type-Check, Compile and Minify for Production
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
This is also called by `hatch build` during Python packaging.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user