feat: update README

pull/381/head
Lucas Nogueira 2 years ago
parent d677f73495
commit 895115e707
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-app = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-app = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-app
# or
npm add @tauri-apps/plugin-app
# or
yarn add @tauri-apps/plugin-app
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-app#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-app#v2
@ -51,7 +60,9 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as app from "@tauri-apps/plugin-app";
import { getVersion, hide } from '@tauri-apps/plugin-app';
const appVersion = await getVersion();
await hide();
```
## Contributing

@ -18,8 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-authenticator = "0.1"
# or through git
tauri-plugin-authenticator = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-authenticator = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -27,6 +27,16 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-authenticator
# or
npm add @tauri-apps/plugin-authenticator
# or
yarn add @tauri-apps/plugin-authenticator
```
Alternatively with Git:
```sh
pnpm add https://github.com/tauri-apps/tauri-plugin-authenticator#v2
# or

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-autostart = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-autostart = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-autostart
# or
npm add @tauri-apps/plugin-autostart
# or
yarn add @tauri-apps/plugin-autostart
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-autostart#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-autostart#v2

@ -1,6 +1,6 @@
![plugin-cli](banner.jpg)
![CLI](banner.jpg)
<!-- description -->
Parse arguments from your Command Line Interface.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-cli = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-cli = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-cli
# or
npm add @tauri-apps/plugin-cli
# or
yarn add @tauri-apps/plugin-cli
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-cli#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-cli#v2
@ -51,7 +60,18 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { getMatches } from '@tauri-apps/plugin-cli';
const matches = await getMatches();
if (matches.subcommand?.name === 'run') {
// `./your-app run $ARGS` was executed
const args = matches.subcommand?.matches.args
if ('debug' in args) {
// `./your-app run --debug` was executed
}
} else {
const args = matches.args
// `./your-app $ARGS` was executed
}
```
## Contributing

@ -1,6 +1,6 @@
![plugin-clipboard](banner.jpg)
<!-- description -->
Read and write to the system clipboard.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-clipboard = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-clipboard = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-clipboard
# or
npm add @tauri-apps/plugin-clipboard
# or
yarn add @tauri-apps/plugin-clipboard
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-clipboard#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-clipboard#v2
@ -51,7 +60,9 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { writeText, readText } from '@tauri-apps/plugin-clipboard';
await writeText('Tauri is awesome!');
assert(await readText(), 'Tauri is awesome!');
```
## Contributing

@ -1,6 +1,6 @@
![Dialog](banner.jpg)
<!-- description -->
Native system dialogs for opening and saving files along with message dialogs.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-dialog = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-dialog = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -31,6 +33,13 @@ pnpm add @tauri-apps/plugin-dialog
npm add @tauri-apps/plugin-dialog
# or
yarn add @tauri-apps/plugin-dialog
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-dialog#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-dialog#v2
# or
yarn add https://github.com/tauri-apps/tauri-plugin-dialog#v2
```
## Usage

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-fs = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-fs = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-fs
# or
npm add @tauri-apps/plugin-fs
# or
yarn add @tauri-apps/plugin-fs
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-fs#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-fs#v2

@ -1,6 +1,6 @@
![plugin-shortcut](banner.jpg)
<!-- description -->
Register global shortcuts.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-global-shortcut = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-shortcut = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,11 +28,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add https://github.com/tauri-apps/tauri-plugin-shortcut#v2
pnpm add @tauri-apps/plugin-global-shortcut
# or
npm add https://github.com/tauri-apps/tauri-plugin-shortcut#v2
npm add @tauri-apps/plugin-global-shortcut
# or
yarn add https://github.com/tauri-apps/tauri-plugin-shortcut#v2
yarn add @tauri-apps/plugin-global-shortcut
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
# or
yarn add https://github.com/tauri-apps/tauri-plugin-global-shortcut#v2
```
## Usage

@ -1,6 +1,6 @@
![plugin-http](banner.jpg)
![HTTP](banner.jpg)
<!-- description -->
Access the HTTP client written in Rust.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-http = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-http = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-http
# or
npm add @tauri-apps/plugin-http
# or
yarn add @tauri-apps/plugin-http
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-http#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-http#v2
@ -51,7 +60,11 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { fetch } from '@tauri-apps/plugin-http';
const response = await fetch('http://localhost:3003/users/2', {
method: 'GET',
timeout: 30,
});
```
## Contributing

@ -20,8 +20,10 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
portpicker = "0.1" # used in the example to pick a random free port
tauri-plugin-localhost = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
## Usage
@ -31,27 +33,26 @@ First you need to register the core plugin with Tauri:
`src-tauri/src/main.rs`
```rust
use tauri::{utils::config::AppUrl, window::WindowBuilder, WindowUrl};
use tauri::{Manager, window::WindowBuilder, WindowUrl};
fn main() {
let port = portpicker::pick_unused_port().expect("failed to find unused port");
let mut context = tauri::generate_context!();
let url = format!("http://localhost:{}", port).parse().unwrap();
let window_url = WindowUrl::External(url);
// rewrite the config so the IPC is enabled on this URL
context.config_mut().build.dist_dir = AppUrl::Url(window_url.clone());
context.config_mut().build.dev_path = AppUrl::Url(window_url.clone());
tauri::Builder::default()
.plugin(tauri_plugin_localhost::Builder::new(port).build())
.setup(move |app| {
WindowBuilder::new(app, "main".to_string(), window_url)
app.ipc_scope().configure_remote_access(
RemoteDomainAccessScope::new(format!("localhost:{}", port))
.add_window("main")
);
let url = format!("http://localhost:{}", port).parse().unwrap();
WindowBuilder::new(app, "main".to_string(), WindowUrl::External(url))
.title("Localhost Example")
.build()?;
Ok(())
})
.run(context)
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-log = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-log
# or
npm add @tauri-apps/plugin-log
# or
yarn add @tauri-apps/plugin-log
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-log#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-log#v2

@ -1,6 +1,6 @@
![{{plugin name}}](banner.jpg)
![Notification](banner.jpg)
<!-- description -->
Send message notifications (brief auto-expiring OS window element) to your user. Can also be used with the Notification Web API.
## Install
@ -18,7 +18,9 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
<!-- plugin here --> = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
tauri-plugin-notification = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-notification = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@ -26,11 +28,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add <!-- plugin here -->
pnpm add @tauri-apps/plugin-notification
# or
npm add <!-- plugin here -->
npm add @tauri-apps/plugin-notification
# or
yarn add <!-- plugin here -->
yarn add @tauri-apps/plugin-notification
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-notification#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-notification#v2
# or
yarn add https://github.com/tauri-apps/tauri-plugin-notification#v2
```
## Usage
@ -42,7 +51,7 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(<!-- plugin here -->)
.plugin(tauri_plugin_notification::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-os = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-os = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-os
# or
npm add @tauri-apps/plugin-os
# or
yarn add @tauri-apps/plugin-os
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-os#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-os#v2
@ -51,7 +60,8 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as os from "@tauri-apps/plugin-os";
import { version } from '@tauri-apps/plugin-os';
const osVersion = await version();
```
## Contributing

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-persisted-scope = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

@ -20,8 +20,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-positioner = "1.0"
# or through git
tauri-plugin-positioner = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-positioner = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -35,11 +35,8 @@ pnpm add @tauri-apps/plugin-positioner
npm add @tauri-apps/plugin-positioner
# or
yarn add @tauri-apps/plugin-positioner
```
Or through git:
```sh
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-positioner#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-positioner#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-process = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-process
# or
npm add @tauri-apps/plugin-process
# or
yarn add @tauri-apps/plugin-process
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-process#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-process#v2
@ -51,7 +60,11 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as process from "@tauri-apps/plugin-process";
import { exit, relaunch } from '@tauri-apps/plugin-process';
// exit the app with the given status code
await exit(0);
// restart the app
await relaunch();
```
## Contributing

@ -1,6 +1,6 @@
![plugin-shell](banner.jpg)
![Shell](banner.jpg)
<!-- description -->
Access the system shell. Allows you to spawn child processes and manage files and URLs using their default application.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-shell = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-shell
# or
npm add @tauri-apps/plugin-shell
# or
yarn add @tauri-apps/plugin-shell
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-shell#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-shell#v2
@ -51,7 +60,8 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { Command } from '@tauri-apps/plugin-shell'
Command.create('git', ['commit', '-m', 'the commit message'])
```
## Contributing

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-single-instance = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```

@ -18,9 +18,11 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies.tauri-plugin-sql]
features = ["sqlite"] # or "postgres", or "mysql"
version = "2.0.0-alpha"
# alternatively with Git
git = "https://github.com/tauri-apps/plugins-workspace"
branch = "v2"
features = ["sqlite"] # or "postgres", or "mysql"
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@ -28,6 +30,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-sql
# or
npm add @tauri-apps/plugin-sql
# or
yarn add @tauri-apps/plugin-sql
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-sql#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-sql#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-store = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-store
# or
npm add @tauri-apps/plugin-store
# or
yarn add @tauri-apps/plugin-store
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-store#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-store#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-stronghold = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-stronghold
# or
npm add @tauri-apps/plugin-stronghold
# or
yarn add @tauri-apps/plugin-stronghold
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-stronghold#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-updater = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-updater
# or
npm add @tauri-apps/plugin-updater
# or
yarn add @tauri-apps/plugin-updater
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-updater#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-updater#v2
@ -51,7 +60,13 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as updater from "@tauri-apps/plugin-updater";
import { check } from "@tauri-apps/plugin-updater";
import { relaunch } from "@tauri-apps/plugin-process";
const update = await check();
if (update.response.available) {
await update.downloadAndInstall();
await relaunch();
}
```
## Contributing

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-upload = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-upload
# or
npm add @tauri-apps/plugin-upload
# or
yarn add @tauri-apps/plugin-upload
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-upload#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-upload#v2

@ -1,6 +1,6 @@
![plugin-websocket](banner.png)
<!-- description -->
Expose a WebSocket server to your Tauri frontend.
## Install
@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-websocket = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-websocket = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-websocket
# or
npm add @tauri-apps/plugin-websocket
# or
yarn add @tauri-apps/plugin-websocket
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-websocket#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-websocket#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-window-state = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-window-state
# or
npm add @tauri-apps/plugin-window-state
# or
yarn add @tauri-apps/plugin-window-state
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-window-state#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-window-state#v2

@ -18,6 +18,8 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-window = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-window = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
@ -26,6 +28,13 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add @tauri-apps/plugin-window
# or
npm add @tauri-apps/plugin-window
# or
yarn add @tauri-apps/plugin-window
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-window#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-window#v2
@ -51,7 +60,20 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import * as tauriWindow from "@tauri-apps/plugin-window";
import { appWindow, WebviewWindow } from "@tauri-apps/plugin-window";
// manipulating this window
await appWindow.setResizable(false);
// Creating new windows:
// loading embedded asset:
const webview = new WebviewWindow('theUniqueLabel', {
url: 'path/to/page.html'
});
// alternatively, load a remote URL:
const webview = new WebviewWindow('theUniqueLabel', {
url: 'https://github.com/tauri-apps/tauri'
});
```
## Contributing

@ -1,4 +1,4 @@
![{{plugin name}}](banner.jpg)
![{{plugin-name}}](banner.jpg)
<!-- description -->
@ -18,7 +18,9 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
<!-- plugin here --> = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
tauri-plugin-{{plugin-name}} = "2.0.0-alpha"
# alternatively with Git:
tauri-plugin-{{plugin-name}} = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@ -26,11 +28,18 @@ You can install the JavaScript Guest bindings using your preferred JavaScript pa
> Note: Since most JavaScript package managers are unable to install packages from git monorepos we provide read-only mirrors of each plugin. This makes installation option 2 more ergonomic to use.
```sh
pnpm add <!-- plugin here -->
pnpm add @tauri-apps/plugin-{{plugin-name}}
# or
npm add <!-- plugin here -->
npm add @tauri-apps/plugin-{{plugin-name}}
# or
yarn add <!-- plugin here -->
yarn add @tauri-apps/plugin-{{plugin-name}}
# alternatively with Git:
pnpm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
# or
npm add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
# or
yarn add https://github.com/tauri-apps/tauri-plugin-{{plugin-name}}#v2
```
## Usage
@ -42,7 +51,7 @@ First you need to register the core plugin with Tauri:
```rust
fn main() {
tauri::Builder::default()
.plugin(<!-- plugin here -->)
.plugin(tauri_plugin_{{plugin-name}}::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

Loading…
Cancel
Save