mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
docs(examples): add missing Readme and clarify existing (#3327)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
parent
15358b1895
commit
e57a303748
5
examples/README.md
Normal file
5
examples/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Examples
|
||||
|
||||
Following directories contain examples of tauri app functionality.
|
||||
|
||||
There are different execution steps depending on the example. See each directory `README.md` for execution method.
|
@ -5,17 +5,9 @@ In the future, this app will be used on Tauri's integration tests.
|
||||
![App screenshot](./screenshot.png?raw=true)
|
||||
|
||||
## Running the example
|
||||
- Install dependencies (Run inside of this folder tauri/examples/api/)
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn
|
||||
# with npm
|
||||
$ npm install
|
||||
```
|
||||
|
||||
- Compile tauri
|
||||
go to root of the tauri repo and run
|
||||
|
||||
- Compile Tauri
|
||||
go to root of the Tauri repo and run:
|
||||
Linux / Mac:
|
||||
```
|
||||
# choose to install node cli (1)
|
||||
@ -27,7 +19,15 @@ Windows:
|
||||
./.scripts/setup.ps1
|
||||
```
|
||||
|
||||
- Compile the app (Run inside of this folder tauri/examples/api/)
|
||||
- Install dependencies (Run inside of this folder `examples/api/`)
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn
|
||||
# with npm
|
||||
$ npm install
|
||||
```
|
||||
|
||||
- Run the app in development mode (Run inside of this folder `examples/api/`)
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn tauri dev
|
||||
@ -35,7 +35,8 @@ $ yarn tauri dev
|
||||
$ npm run tauri dev
|
||||
```
|
||||
|
||||
- Run the app
|
||||
- Build an run the release app (Run inside of this folder `examples/api/`)
|
||||
```bash
|
||||
$ yarn tauri build
|
||||
$ ./src-tauri/target/release/app
|
||||
```
|
||||
|
5
examples/commands/README.md
Normal file
5
examples/commands/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Commands Example
|
||||
|
||||
A simple Tauri Application showcasing the command API.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example commands`.
|
3
examples/helloworld/README.md
Normal file
3
examples/helloworld/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Hello Wolrd Example
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo example --helloworld`.
|
5
examples/multiwindow/README.md
Normal file
5
examples/multiwindow/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Multi-Window Example
|
||||
|
||||
An example Tauri Multi-Window Application.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example multiwindow`.
|
5
examples/navigation/README.md
Normal file
5
examples/navigation/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Naviagtion Example
|
||||
|
||||
A very simple Tauri Appplication with frontend navigation.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example navigation`.
|
@ -1,3 +1,5 @@
|
||||
# Resource example
|
||||
|
||||
This example demonstrates the Tauri bundle resources functionality. The example adds `src-tauri/assets/index.js` as a resource (defined on `tauri.conf.json > tauri > bundle > resources`) and executes it using `Node.js`, locating the JavaScript file using the `tauri::api::path::resolve_path` API.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example resources`.
|
||||
|
@ -1,3 +1,43 @@
|
||||
# Sidecar example
|
||||
|
||||
This example demonstrates how to use the Tauri sidecar feature. It uses [pkg](https://github.com/vercel/pkg) to compile a Node.js application and bundle it on the Tauri application.
|
||||
|
||||
## Running the example
|
||||
|
||||
- Compile Tauri
|
||||
go to root of the Tauri repo and run:
|
||||
Linux / Mac:
|
||||
```
|
||||
# choose to install node cli (1)
|
||||
bash .scripts/setup.sh
|
||||
```
|
||||
|
||||
Windows:
|
||||
```
|
||||
./.scripts/setup.ps1
|
||||
```
|
||||
|
||||
- Install dependencies (Run inside of this folder `examples/sidecar/`)
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn
|
||||
# with npm
|
||||
$ npm install
|
||||
|
||||
$ yarn tauri
|
||||
$ yarn package
|
||||
```
|
||||
|
||||
- Run the app in development mode (Run inside of this folder `examples/sidecar/`)
|
||||
```bash
|
||||
# with yarn
|
||||
$ yarn tauri dev
|
||||
# with npm
|
||||
$ npm run tauri dev
|
||||
```
|
||||
|
||||
- Build an run the release app (Run inside of this folder `examples/sidecar/`)
|
||||
```bash
|
||||
$ yarn tauri build
|
||||
$ ./src-tauri/target/release/app
|
||||
```
|
||||
|
5
examples/state/README.md
Normal file
5
examples/state/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# State example
|
||||
|
||||
A simple Tauri Appplication showcase the application State usage.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example state`
|
5
examples/streaming/README.md
Normal file
5
examples/streaming/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Streaming example
|
||||
|
||||
A simple Tauri Appplication showcase the streaming functionality.
|
||||
|
||||
To execute run the following on the root directory of the repository: `cargo run --example streaming`.
|
29
examples/updater/README.md
Normal file
29
examples/updater/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# Updater Example
|
||||
|
||||
This example showcases the App Updater feature.
|
||||
|
||||
## Running the example
|
||||
|
||||
- Compile Tauri
|
||||
go to root of the Tauri repo and run:
|
||||
Linux / Mac:
|
||||
```
|
||||
# choose to install node cli (1)
|
||||
bash .scripts/setup.sh
|
||||
```
|
||||
|
||||
Windows:
|
||||
```
|
||||
./.scripts/setup.ps1
|
||||
```
|
||||
|
||||
- Run the app in development mode (Run inside of this folder `examples/updater/`)
|
||||
```bash
|
||||
$ cargo tauri dev
|
||||
```
|
||||
|
||||
- Build an run the release app (Run inside of this folder `examples/updater/`)
|
||||
```bash
|
||||
$ cargo tauri build
|
||||
$ ./src-tauri/target/release/app
|
||||
```
|
Loading…
Reference in New Issue
Block a user