mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
docs: update README.md and remove allowlist information (#381)
This commit is contained in:
committed by
GitHub
parent
d677f73495
commit
f4069f5588
+13
-2
@@ -1,4 +1,4 @@
|
||||
# App plugin
|
||||
# App
|
||||
|
||||
This plugin provides APIs to read application metadata and macOS app visibility functions.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,22 +5,6 @@
|
||||
/**
|
||||
* Get application metadata.
|
||||
*
|
||||
* The APIs must be added to [`tauri.allowlist.app`](https://tauri.app/v1/api/config/#allowlistconfig.app) in `tauri.conf.json`:
|
||||
* ```json
|
||||
* {
|
||||
* "tauri": {
|
||||
* "allowlist": {
|
||||
* "app": {
|
||||
* "all": true, // enable all app APIs
|
||||
* "show": true,
|
||||
* "hide": true
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
|
||||
*
|
||||
* @module
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user