diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 000000000..3db0e7ea6 --- /dev/null +++ b/examples/README.md @@ -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. diff --git a/examples/api/README.md b/examples/api/README.md index afcea3842..d9fe94b1f 100644 --- a/examples/api/README.md +++ b/examples/api/README.md @@ -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 ``` diff --git a/examples/commands/README.md b/examples/commands/README.md new file mode 100644 index 000000000..671b450a0 --- /dev/null +++ b/examples/commands/README.md @@ -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`. diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md new file mode 100644 index 000000000..e3a8ff23f --- /dev/null +++ b/examples/helloworld/README.md @@ -0,0 +1,3 @@ +# Hello Wolrd Example + +To execute run the following on the root directory of the repository: `cargo example --helloworld`. diff --git a/examples/multiwindow/README.md b/examples/multiwindow/README.md new file mode 100644 index 000000000..ee52a1226 --- /dev/null +++ b/examples/multiwindow/README.md @@ -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`. diff --git a/examples/navigation/README.md b/examples/navigation/README.md new file mode 100644 index 000000000..a931ed19a --- /dev/null +++ b/examples/navigation/README.md @@ -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`. diff --git a/examples/resources/README.md b/examples/resources/README.md index 6b13f28fb..13e0bd1b9 100644 --- a/examples/resources/README.md +++ b/examples/resources/README.md @@ -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`. diff --git a/examples/sidecar/README.md b/examples/sidecar/README.md index 7ecc9ecdb..4bf47bf55 100644 --- a/examples/sidecar/README.md +++ b/examples/sidecar/README.md @@ -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 +``` diff --git a/examples/state/README.md b/examples/state/README.md new file mode 100644 index 000000000..f6a401e40 --- /dev/null +++ b/examples/state/README.md @@ -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` diff --git a/examples/streaming/README.md b/examples/streaming/README.md new file mode 100644 index 000000000..4a1cf4f1b --- /dev/null +++ b/examples/streaming/README.md @@ -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`. diff --git a/examples/tauri-dynamic-lib/Readme.md b/examples/tauri-dynamic-lib/README.md similarity index 100% rename from examples/tauri-dynamic-lib/Readme.md rename to examples/tauri-dynamic-lib/README.md diff --git a/examples/updater/README.md b/examples/updater/README.md new file mode 100644 index 000000000..1eb77687d --- /dev/null +++ b/examples/updater/README.md @@ -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 +```