From 9385ba2a2bafdcac9854aad5fd9086538c8af208 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Thu, 19 Sep 2024 17:16:20 +0300 Subject: [PATCH] --- package.json | 50 +++++++++++++++++++++++-------------------------- src/commands.rs | 15 --------------- src/lib.rs | 25 ------------------------- 3 files changed, 23 insertions(+), 67 deletions(-) delete mode 100644 src/commands.rs delete mode 100644 src/lib.rs diff --git a/package.json b/package.json index 041ee6e..9d01aab 100644 --- a/package.json +++ b/package.json @@ -1,29 +1,25 @@ { - "name": "@tauri-apps/plugin-process", - "version": "2.0.0-rc.1", - "license": "MIT or APACHE-2.0", - "authors": [ - "Tauri Programme within The Commons Conservancy" - ], - "repository": "https://github.com/tauri-apps/plugins-workspace", - "type": "module", - "types": "./dist-js/index.d.ts", - "main": "./dist-js/index.cjs", - "module": "./dist-js/index.js", - "exports": { - "types": "./dist-js/index.d.ts", - "import": "./dist-js/index.js", - "require": "./dist-js/index.cjs" - }, - "scripts": { - "build": "rollup -c" - }, - "files": [ - "dist-js", - "README.md", - "LICENSE" - ], - "dependencies": { - "@tauri-apps/api": "^2.0.0-rc.4" - } + "authors": [ + "Tauri Programme within The Commons Conservancy" + ], + "dependencies": { + "@tauri-apps/api": "^2.0.0-rc.4" + }, + "exports": { + "import": "./dist-js/index.js", + "require": "./dist-js/index.cjs", + "types": "./dist-js/index.d.ts" + }, + "files": [ + "dist-js", + "README.md", + "LICENSE" + ], + "main": "./dist-js/index.cjs", + "module": "./dist-js/index.js", + "name": "@tauri-apps/plugin-process", + "scripts": { + "build": "rollup -c" + }, + "types": "./dist-js/index.d.ts" } diff --git a/src/commands.rs b/src/commands.rs deleted file mode 100644 index 2c27a3d..0000000 --- a/src/commands.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use tauri::{AppHandle, Runtime}; - -#[tauri::command] -pub fn exit(app: AppHandle, code: i32) { - app.exit(code) -} - -#[tauri::command] -pub fn restart(app: AppHandle) { - app.restart() -} diff --git a/src/lib.rs b/src/lib.rs deleted file mode 100644 index e0e948f..0000000 --- a/src/lib.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! [![](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/process/banner.png)](https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/process) -//! -//! This plugin provides APIs to access the current process. To spawn child processes, see the [`shell`](https://github.com/tauri-apps/tauri-plugin-shell) plugin. - -#![doc( - html_logo_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png", - html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png" -)] - -use tauri::{ - plugin::{Builder, TauriPlugin}, - Runtime, -}; - -mod commands; - -pub fn init() -> TauriPlugin { - Builder::new("process") - .invoke_handler(tauri::generate_handler![commands::exit, commands::restart]) - .build() -}