Skip to content

Commit

Permalink
docs: update automatic setup instructions (tauri-apps#1856)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasfvitor authored Feb 15, 2024
1 parent 360b70c commit f7f2dcd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 129 deletions.
19 changes: 1 addition & 18 deletions src/content/docs/features/clipboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,13 @@ Install the clipboard plugin to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add clipboard-manager"
yarn="yarn run tauri add clipboard-manager"
pnpm="pnpm tauri add clipboard-manager"
cargo="cargo tauri add clipboard-manager" />

2. Modify `lib.rs` to initialize the plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_clipboard_manager::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```



</TabItem>
<TabItem label="Manual">

Expand Down
14 changes: 1 addition & 13 deletions src/content/docs/features/dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,13 @@ Install the dialog plugin to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add dialog"
yarn="yarn run tauri add dialog"
pnpm="pnpm tauri add dialog"
cargo="cargo tauri add dialog" />

2. Modify `lib.rs` to initialize the plugin:

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_dialog::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```
</TabItem>
<TabItem label="Manual">

Expand Down
18 changes: 1 addition & 17 deletions src/content/docs/features/http-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,13 @@ Install the http plugin to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add http"
yarn="yarn run tauri add http"
pnpm="pnpm tauri add http"
cargo="cargo tauri add http" />

2. Modify `lib.rs` to initialize the plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust ins={6}
// lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_http::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="Manual">

Expand Down
17 changes: 1 addition & 16 deletions src/content/docs/features/notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,13 @@ Install the notifications plugin to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add notification"
yarn="yarn run tauri add notification"
pnpm="pnpm tauri add notification"
cargo="cargo tauri add notification" />

2. Modify `lib.rs` to initialize the plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_notification::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="Manual">

Expand Down
17 changes: 1 addition & 16 deletions src/content/docs/features/os-info.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,13 @@ Install the OS Information plugin to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add os"
yarn="yarn run tauri add os"
pnpm="pnpm tauri add os"
cargo="cargo tauri add os" />

2. Modify `lib.rs` to initialize the plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_os::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="Manual">

Expand Down
18 changes: 1 addition & 17 deletions src/content/docs/features/process.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,13 @@ Install the plugin-process to get started.
<Tabs>
<TabItem label="Automatic">

1. Use your project's package manager to add the dependency:
Use your project's package manager to add the dependency:

<CommandTabs npm="npm run tauri add process"
yarn="yarn run tauri add process"
pnpm="pnpm tauri add process"
cargo="cargo tauri add process" />

2. Modify `lib.rs` to initialize the plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust ins={6}
// lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialize the plugin
.plugin(tauri_plugin_process::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="Manual">

Expand Down
17 changes: 1 addition & 16 deletions src/content/docs/fr/features/notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,13 @@ Pour commencer, installez le plugin de notifications.
<Tabs>
<TabItem label="Automatic">

1. Utilisez le gestionnaire de package (package manager) de votre projet pour ajouter la dépendance:
Utilisez le gestionnaire de package (package manager) de votre projet pour ajouter la dépendance:

<CommandTabs npm="npm run tauri add notification"
yarn="yarn run tauri add notification"
pnpm="pnpm tauri add notification"
cargo="cargo tauri add notification" />

2. Modifiez `lib.rs` pour initialiser le plugin:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// Initialisation du plugin
.plugin(tauri_plugin_notification::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="Manual">

Expand Down
17 changes: 1 addition & 16 deletions src/content/docs/zh-cn/features/notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,13 @@ import Stub from '@components/Stub.astro';
<Tabs>
<TabItem label="自动">

1. 使用你的项目的包管理器以添加依赖:
使用你的项目的包管理器以添加依赖:

<CommandTabs npm="npm run tauri plugin add notification"
yarn="yarn run tauri plugin add notification"
pnpm="pnpm tauri plugin add notification"
cargo="cargo tauri plugin add notification" />

2. 修改 `lib.rs` 以初始化插件:

{/* TODO: Revise once https://github.com/tauri-apps/tauri/issues/7696 is in */}

```rust
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
// 初始化插件
.plugin(tauri_plugin_notification::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
```

</TabItem>
<TabItem label="手动">

Expand Down

0 comments on commit f7f2dcd

Please sign in to comment.