mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-26 21:41:48 +02:00
feat: improve stronghold readme (#1027)
* fix: typo * feat: update client package install commands * refactor: instruct user to copy code if unable to install via monorepo
This commit is contained in:
@@ -23,7 +23,7 @@ tauri-plugin-stronghold = { git = "https://github.com/tauri-apps/plugins-workspa
|
|||||||
|
|
||||||
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
You can install the JavaScript Guest bindings using your preferred JavaScript package manager:
|
||||||
|
|
||||||
> 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.
|
> Note: If your JavaScript package manager cannot install packages from git monorepos, you can still use the code by manually copying the [Guest bindings](./guest-js/index.ts) into your source files.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#v1
|
pnpm add https://github.com/tauri-apps/tauri-plugin-stronghold#v1
|
||||||
@@ -75,7 +75,7 @@ Afterwards all the plugin's APIs are available through the JavaScript guest bind
|
|||||||
import { Stronghold, Location, Client } from "tauri-plugin-stronghold-api";
|
import { Stronghold, Location, Client } from "tauri-plugin-stronghold-api";
|
||||||
import { appDataDir } from "@tauri-apps/api/path";
|
import { appDataDir } from "@tauri-apps/api/path";
|
||||||
|
|
||||||
const initStrongHold = async () => {
|
const initStronghold = async () => {
|
||||||
const vaultPath = `${await appDataDir()}/vault.hold`;
|
const vaultPath = `${await appDataDir()}/vault.hold`;
|
||||||
|
|
||||||
const vaultKey = "The key to the vault";
|
const vaultKey = "The key to the vault";
|
||||||
@@ -98,7 +98,7 @@ const initStrongHold = async () => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const { stronghold, client } = await initStrongHold();
|
const { stronghold, client } = await initStronghold();
|
||||||
|
|
||||||
const store = client.getStore();
|
const store = client.getStore();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user