Skip to content

Commit

Permalink
[feat] 初始化项目
Browse files Browse the repository at this point in the history
  • Loading branch information
caryxiao committed Jun 22, 2021
1 parent 81f76f8 commit f9cf563
Show file tree
Hide file tree
Showing 27 changed files with 5,986 additions and 88 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
53 changes: 13 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,19 @@
# Getting Started with Create React App
# Tauri React App

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
这是一个Demo项目。

## Available Scripts
## 如何使用?

In the project directory, you can run:
这里默认你会安装rust环境。 如果不会请自行百度或者谷歌搜索。

### `yarn start`
执行下面命令前请先安装rust。

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
```bash
# 安装依赖
yarn install
# 执行开发环境
yarn start
# 打包
yarn build
```

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@tauri-apps/api": "^1.0.0-beta.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
Expand All @@ -17,8 +18,13 @@
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"start": "concurrently -p \"[{name}]\" -n \"front-end,tauri\" -c \"bgGreen.bold,bgCyan.bold\" --handle-input \"yarn start:server\" \"yarn start:tauri\" ",
"start:fe": "react-scripts start",
"start:tauri": "RUST_DEBUG=1 tauri dev",
"build": "yarn build:fe && yarn build:fe-move && yarn build:tauri",
"build:fe": "react-scripts build",
"build:fe-move": "mv build ./dist",
"build:tauri": "tauri build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand All @@ -39,5 +45,9 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@tauri-apps/cli": "^1.0.0-beta.2",
"concurrently": "^6.2.0"
}
}
4 changes: 4 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/
WixTools
Loading

0 comments on commit f9cf563

Please sign in to comment.