Skip to content

Commit

Permalink
chore: adjust prettier config, .gitignore and use taplo to format tom…
Browse files Browse the repository at this point in the history
…l 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 <[email protected]>

Committed via a GitHub action: https://github.com/tauri-apps/plugins-workspace/actions/runs/10701104849

Co-authored-by: lucasfernog <[email protected]>
  • Loading branch information
2 people authored and tauri-bot committed Sep 4, 2024
1 parent fd6ea73 commit 9feabac
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repository = { workspace = true }
links = "tauri-plugin-process"

[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs"]

[build-dependencies]
tauri-plugin = { workspace = true, features = [ "build" ] }
tauri-plugin = { workspace = true, features = ["build"] }

[dependencies]
tauri = { workspace = true }
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ fn main() {
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:

```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
await exit(0);
await exit(0)
// restart the app
await relaunch();
await relaunch()
```

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Alternatively, you can also contact us by email via [[email protected]](mailto:[email protected]).
Alternatively, you can also contact us by email via [[email protected]](mailto:[email protected]).
4 changes: 2 additions & 2 deletions dist-js/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var core = require('@tauri-apps/api/core');
* @since 2.0.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.
Expand All @@ -38,7 +38,7 @@ async function exit(code = 0) {
* @since 2.0.0
*/
async function relaunch() {
await core.invoke("plugin:process|restart");
await core.invoke('plugin:process|restart');
}

exports.exit = exit;
Expand Down
4 changes: 2 additions & 2 deletions dist-js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { invoke } from '@tauri-apps/api/core';
* @since 2.0.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.
Expand All @@ -36,7 +36,7 @@ async function exit(code = 0) {
* @since 2.0.0
*/
async function relaunch() {
await invoke("plugin:process|restart");
await invoke('plugin:process|restart');
}

export { exit, relaunch };
8 changes: 4 additions & 4 deletions guest-js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module
*/

import { invoke } from "@tauri-apps/api/core";
import { invoke } from '@tauri-apps/api/core'

/**
* Exits immediately with the given `exitCode`.
Expand All @@ -23,7 +23,7 @@ import { invoke } from "@tauri-apps/api/core";
* @since 2.0.0
*/
async function exit(code = 0): Promise<void> {
await invoke("plugin:process|exit", { code });
await invoke('plugin:process|exit', { code })
}

/**
Expand All @@ -39,7 +39,7 @@ async function exit(code = 0): Promise<void> {
* @since 2.0.0
*/
async function relaunch(): Promise<void> {
await invoke("plugin:process|restart");
await invoke('plugin:process|restart')
}

export { exit, relaunch };
export { exit, relaunch }
5 changes: 1 addition & 4 deletions permissions/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,4 @@ This enables to quit via `allow-exit` and restart via `allow-restart`
the application.
"""

permissions = [
"allow-exit",
"allow-restart",
]
permissions = ["allow-exit", "allow-restart"]
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT

import { createConfig } from "../../shared/rollup.config.js";
import { createConfig } from '../../shared/rollup.config.js'

export default createConfig();
export default createConfig()

0 comments on commit 9feabac

Please sign in to comment.