update readme
This commit is contained in:
parent
8979ec0efc
commit
49c2782b1d
68
README.md
68
README.md
@ -1,39 +1,45 @@
|
|||||||
# React + TypeScript + Vite
|
# Deno and React.js
|
||||||
|
|
||||||
This template provides a minimal setup to get React working in Vite with HMR and
|
## A dinosaur app built with React, Vite and TypeScript
|
||||||
some ESLint rules.
|
|
||||||
|
|
||||||
Currently, two official plugins are available:
|
This demo is a simple React app. It uses Vite as the local server, and is
|
||||||
|
written in TypeScript. The app is a simple dinosaur app that displays a list of
|
||||||
|
dinosaurs and allows the user to add a new dinosaur to the list.
|
||||||
|
|
||||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md)
|
You can follow along with the tutorial on the
|
||||||
uses [Babel](https://babeljs.io/) for Fast Refresh
|
[Deno Docs](https://docs.deno.com/runtime/tutorials/how_to_with_npm/react/).
|
||||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc)
|
|
||||||
uses [SWC](https://swc.rs/) for Fast Refresh
|
|
||||||
|
|
||||||
## Expanding the ESLint configuration
|
## Run the app
|
||||||
|
|
||||||
If you are developing a production application, we recommend updating the
|
To run the app, you need to have [Deno](https://deno.land/) installed on your
|
||||||
configuration to enable type aware lint rules:
|
machine. You can install Deno by running the following command, or following the
|
||||||
|
instructions in the [Deno docs](https://docs.deno.com/runtime/):
|
||||||
|
|
||||||
- Configure the top-level `parserOptions` property like this:
|
```bash
|
||||||
|
curl -fsSL https://deno.land/install.sh | sh
|
||||||
```js
|
|
||||||
export default {
|
|
||||||
// other rules...
|
|
||||||
parserOptions: {
|
|
||||||
ecmaVersion: "latest",
|
|
||||||
sourceType: "module",
|
|
||||||
project: ["./tsconfig.json", "./tsconfig.node.json", "./tsconfig.app.json"],
|
|
||||||
tsconfigRootDir: __dirname,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Replace `plugin:@typescript-eslint/recommended` to
|
Once you have Deno installed, you can run the app with the following command:
|
||||||
`plugin:@typescript-eslint/recommended-type-checked` or
|
|
||||||
`plugin:@typescript-eslint/strict-type-checked`
|
```bash
|
||||||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
|
deno task dev
|
||||||
- Install
|
```
|
||||||
[eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and
|
|
||||||
add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends`
|
## Build the app
|
||||||
list
|
|
||||||
|
To build the app, you can run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
deno task build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Serve the app with Deno
|
||||||
|
|
||||||
|
To serve the app with Deno, you can run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
deno task serve
|
||||||
|
```
|
||||||
|
|
||||||
|
 💚
|
||||||
|

|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user