mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-04 13:48:01 +02: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>
This commit is contained in:
@@ -1 +0,0 @@
|
||||
node_modules
|
||||
@@ -10,11 +10,11 @@ repository = { workspace = true }
|
||||
links = "tauri-plugin-autostart"
|
||||
|
||||
[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]
|
||||
serde = { workspace = true }
|
||||
|
||||
@@ -62,13 +62,13 @@ fn main() {
|
||||
Afterwards all the plugin's APIs are available through the JavaScript guest bindings:
|
||||
|
||||
```javascript
|
||||
import { enable, isEnabled, disable } from "@tauri-apps/plugin-autostart";
|
||||
import { enable, isEnabled, disable } from '@tauri-apps/plugin-autostart'
|
||||
|
||||
await enable();
|
||||
await enable()
|
||||
|
||||
console.log(`registered for autostart? ${await isEnabled()}`);
|
||||
console.log(`registered for autostart? ${await isEnabled()}`)
|
||||
|
||||
disable();
|
||||
disable()
|
||||
```
|
||||
|
||||
## 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).
|
||||
|
||||
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).
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
|
||||
export async function isEnabled(): Promise<boolean> {
|
||||
return await invoke("plugin:autostart|is_enabled");
|
||||
return await invoke('plugin:autostart|is_enabled')
|
||||
}
|
||||
|
||||
export async function enable(): Promise<void> {
|
||||
await invoke("plugin:autostart|enable");
|
||||
await invoke('plugin:autostart|enable')
|
||||
}
|
||||
|
||||
export async function disable(): Promise<void> {
|
||||
await invoke("plugin:autostart|disable");
|
||||
await invoke('plugin:autostart|disable')
|
||||
}
|
||||
|
||||
@@ -12,8 +12,4 @@ disable the automatic start on boot.
|
||||
|
||||
"""
|
||||
|
||||
permissions = [
|
||||
"allow-enable",
|
||||
"allow-disable",
|
||||
"allow-is-enabled",
|
||||
]
|
||||
permissions = ["allow-enable", "allow-disable", "allow-is-enabled"]
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user