mirror of
https://github.com/tauri-apps/tauri-plugin-process.git
synced 2026-01-31 00:55:17 +01:00
chore: adjust prettier config, .gitignore and use taplo to format toml files (#1728)
* chore: adjust prettier config, .gitignore and use taplo to format toml files This brings the plugins-workspace repository to the same code style of the main tauri repo * format toml * ignore examples gen dir * add .vscode/extensions.json * remove packageManager field * fmt * fix audit * taplo ignore permissions autogenerated files * remove create dummy dist * fix prettier workflow * install fmt in prettier workflow --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app> Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/10701104849 Co-authored-by: lucasfernog <lucasfernog@users.noreply.github.com>
This commit is contained in:
@@ -10,11 +10,11 @@ repository = { workspace = true }
|
|||||||
links = "tauri-plugin-process"
|
links = "tauri-plugin-process"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
rustc-args = [ "--cfg", "docsrs" ]
|
rustc-args = ["--cfg", "docsrs"]
|
||||||
rustdoc-args = [ "--cfg", "docsrs" ]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-plugin = { workspace = true, features = [ "build" ] }
|
tauri-plugin = { workspace = true, features = ["build"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tauri = { workspace = true }
|
tauri = { workspace = true }
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ fn main() {
|
|||||||
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import { exit, relaunch } from "@tauri-apps/plugin-process";
|
import { exit, relaunch } from '@tauri-apps/plugin-process'
|
||||||
// exit the app with the given status code
|
// exit the app with the given status code
|
||||||
await exit(0);
|
await exit(0)
|
||||||
// restart the app
|
// restart the app
|
||||||
await relaunch();
|
await relaunch()
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ We prefer to receive reports in English.
|
|||||||
|
|
||||||
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
|
Please disclose a vulnerability or security relevant issue here: [https://github.com/tauri-apps/plugins-workspace/security/advisories/new](https://github.com/tauri-apps/plugins-workspace/security/advisories/new).
|
||||||
|
|
||||||
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
|
Alternatively, you can also contact us by email via [security@tauri.app](mailto:security@tauri.app).
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ var core = require('@tauri-apps/api/core');
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function exit(code = 0) {
|
async function exit(code = 0) {
|
||||||
await core.invoke("plugin:process|exit", { code });
|
await core.invoke('plugin:process|exit', { code });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Exits the current instance of the app then relaunches it.
|
* Exits the current instance of the app then relaunches it.
|
||||||
@@ -38,7 +38,7 @@ async function exit(code = 0) {
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function relaunch() {
|
async function relaunch() {
|
||||||
await core.invoke("plugin:process|restart");
|
await core.invoke('plugin:process|restart');
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.exit = exit;
|
exports.exit = exit;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { invoke } from '@tauri-apps/api/core';
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function exit(code = 0) {
|
async function exit(code = 0) {
|
||||||
await invoke("plugin:process|exit", { code });
|
await invoke('plugin:process|exit', { code });
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Exits the current instance of the app then relaunches it.
|
* Exits the current instance of the app then relaunches it.
|
||||||
@@ -36,7 +36,7 @@ async function exit(code = 0) {
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function relaunch() {
|
async function relaunch() {
|
||||||
await invoke("plugin:process|restart");
|
await invoke('plugin:process|restart');
|
||||||
}
|
}
|
||||||
|
|
||||||
export { exit, relaunch };
|
export { exit, relaunch };
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* @module
|
* @module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from '@tauri-apps/api/core'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exits immediately with the given `exitCode`.
|
* Exits immediately with the given `exitCode`.
|
||||||
@@ -23,7 +23,7 @@ import { invoke } from "@tauri-apps/api/core";
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function exit(code = 0): Promise<void> {
|
async function exit(code = 0): Promise<void> {
|
||||||
await invoke("plugin:process|exit", { code });
|
await invoke('plugin:process|exit', { code })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,7 +39,7 @@ async function exit(code = 0): Promise<void> {
|
|||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
*/
|
*/
|
||||||
async function relaunch(): Promise<void> {
|
async function relaunch(): Promise<void> {
|
||||||
await invoke("plugin:process|restart");
|
await invoke('plugin:process|restart')
|
||||||
}
|
}
|
||||||
|
|
||||||
export { exit, relaunch };
|
export { exit, relaunch }
|
||||||
|
|||||||
@@ -11,7 +11,4 @@ This enables to quit via `allow-exit` and restart via `allow-restart`
|
|||||||
the application.
|
the application.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
permissions = [
|
permissions = ["allow-exit", "allow-restart"]
|
||||||
"allow-exit",
|
|
||||||
"allow-restart",
|
|
||||||
]
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
import { createConfig } from "../../shared/rollup.config.js";
|
import { createConfig } from '../../shared/rollup.config.js'
|
||||||
|
|
||||||
export default createConfig();
|
export default createConfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user