Skip to content

Commit

Permalink
Merge pull request #16 from darwintree/main
Browse files Browse the repository at this point in the history
doc: update demo readme
  • Loading branch information
SSSensational authored May 14, 2024
2 parents bade944 + 126a1a0 commit 010ee99
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
38 changes: 14 additions & 24 deletions examples/ReactDemo/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
# React + TypeScript + Vite
# README

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
This is the example project showing how to use the `use-wallet` library to connect to Fluent wallet with Conflux eSpace as target chain using [React](https://react.dev/).

Currently, two official plugins are available:
You can also switch to other wallets like Metamask or switch to other target chains like Conflux core space by modifying the example code.

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## How to start

## Expanding the ESLint configuration
Making sure [node](https://nodejs.org/en) is installed. Then run

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

- Configure the top-level `parserOptions` property like this:

```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```sh
# install dependencies
npm install
# develop and project will start on localhost:5173
npm run dev
# or build
npm run build
# preview built files
npm run preview
```

- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
4 changes: 2 additions & 2 deletions examples/VanillaDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm install
# develop and project will start on localhost:5173
npm run dev
# or build
npm build
npm run build
# preview built files

npm run preview
```
21 changes: 16 additions & 5 deletions examples/Vue3Demo/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Vue 3 + TypeScript + Vite
# README

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
This is the example project showing how to use the `use-wallet` library to connect to Fluent wallet with Conflux eSpace as target chain using [Vue.js](https://vuejs.org/).

## Recommended Setup
You can also switch to other wallets like Metamask or switch to other target chains like Conflux core space by modifying the example code.

- [VS Code](https://code.visualstudio.com/) + [Vue - Official](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (previously Volar) and disable Vetur
## How to start

- Use [vue-tsc](https://github.com/vuejs/language-tools/tree/master/packages/tsc) for performing the same type checking from the command line, or for generating d.ts files for SFCs.
Making sure [node](https://nodejs.org/en) is installed. Then run

```sh
# install dependencies
npm install
# develop and project will start on localhost:5173
npm run dev
# or build
npm run build
# preview built files
npm run preview
```

0 comments on commit 010ee99

Please sign in to comment.