chore: Adapt readmes to next branch

This commit is contained in:
FabianLars
2023-04-26 18:01:46 +02:00
parent b1b6c34b9c
commit 59cb08e902
21 changed files with 116 additions and 136 deletions
+8 -8
View File
@@ -18,7 +18,7 @@ Install the Core plugin by adding the following to your `Cargo.toml` file:
```toml
[dependencies]
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "next" }
```
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
@@ -26,11 +26,11 @@ 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-log
pnpm add https://github.com/tauri-apps/tauri-plugin-log#next
# or
npm add https://github.com/tauri-apps/tauri-plugin-log
npm add https://github.com/tauri-apps/tauri-plugin-log#next
# or
yarn add https://github.com/tauri-apps/tauri-plugin-log
yarn add https://github.com/tauri-apps/tauri-plugin-log#next
```
## Usage
@@ -57,14 +57,14 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
```javascript
import { trace, info, error, attachConsole } from "tauri-plugin-log-api";
import { trace, info, error, attachConsole } from 'tauri-plugin-log-api';
// with LogTarget::Webview enabled this function will print logs to the browser console
const detach = await attachConsole();
trace("Trace");
info("Info");
error("Error");
trace('Trace');
info('Info');
error('Error');
// detach the browser console from the log stream
detach();