mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-11 10:43:31 +02:00
Revert "chore(deps) Update dependency @types/imagemin to v8 (#2635)"
This reverts commit c0285e873d.
This commit is contained in:
committed by
Lucas Nogueira
parent
c0285e873d
commit
ca30dbe2cc
105
docs/api/cli.md
105
docs/api/cli.md
@@ -29,50 +29,17 @@ This command is pretty helpful when you need to have a quick overview of your ap
|
||||
<Command name="init" />
|
||||
|
||||
```
|
||||
Initializes a Tauri project
|
||||
|
||||
USAGE:
|
||||
cargo tauri init [FLAGS] [OPTIONS] [SUBCOMMAND]
|
||||
|
||||
FLAGS:
|
||||
--ci Skip prompting for values
|
||||
-f, --force Force init to overwrite the src-tauri folder
|
||||
-h, --help Print help information
|
||||
-l, --log Enables logging
|
||||
-V, --version Print version information
|
||||
|
||||
OPTIONS:
|
||||
-A, --app-name <app-name> Name of your Tauri application
|
||||
-d, --directory <directory> Set target directory for init
|
||||
-D, --dist-dir <dist-dir> Web assets location, relative to <project-dir>/src-tauri
|
||||
-P, --dev-path <dev-path> Url of your dev server
|
||||
-t, --tauri-path <tauri-path> Path of the Tauri project to use (relative to the cwd)
|
||||
-W, --window-title <window-title> Window title of your Tauri application
|
||||
|
||||
SUBCOMMANDS:
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
plugin Initialize a Tauri plugin.
|
||||
```
|
||||
|
||||
### `init plugin`
|
||||
|
||||
<Command name="init plugin" />
|
||||
|
||||
```
|
||||
Initializes a Tauri plugin project.
|
||||
|
||||
USAGE:
|
||||
cargo tauri init plugin [FLAGS] [OPTIONS] --name <name>
|
||||
|
||||
FLAGS:
|
||||
-a, --api Initializes a Tauri plugin with TypeScript API.
|
||||
-h, --help Print help information
|
||||
-V, --version Print version information
|
||||
|
||||
OPTIONS:
|
||||
-d, --directory <directory> Set target directory for init
|
||||
-n, --name <name> Name of your Tauri plugin
|
||||
-t, --tauri-path <tauri-path> Path of the Tauri project to use (relative to the cwd)
|
||||
Description
|
||||
Inits the Tauri template. If Tauri cannot find the src-tauri/tauri.conf.json
|
||||
it will create one.
|
||||
Usage
|
||||
$ tauri init
|
||||
Options
|
||||
--help, -h Displays this message
|
||||
--force, -f Force init to overwrite [conf|template|all]
|
||||
--log, -l Logging [boolean]
|
||||
--directory, -d Set target directory for init
|
||||
--tauriPath, -t Path of the Tauri project to use (relative to the cwd)
|
||||
```
|
||||
|
||||
## `dev`
|
||||
@@ -80,25 +47,12 @@ OPTIONS:
|
||||
<Command name="dev" />
|
||||
|
||||
```
|
||||
Tauri dev.
|
||||
|
||||
USAGE:
|
||||
cargo tauri dev [FLAGS] [OPTIONS] [--] [args]...
|
||||
|
||||
ARGS:
|
||||
<args>... Args passed to the binary
|
||||
|
||||
FLAGS:
|
||||
-e, --exit-on-panic Exit on panic
|
||||
-h, --help Print help information
|
||||
--release Run the code in release mode
|
||||
-V, --version Print version information
|
||||
|
||||
OPTIONS:
|
||||
-c, --config <config> config JSON to merge with tauri.conf.json
|
||||
-f, --features <features>... list of cargo features to activate
|
||||
-r, --runner <runner> binary to use to run the application
|
||||
-t, --target <target>... target triple to build against
|
||||
Description
|
||||
Tauri dev.
|
||||
Usage
|
||||
$ tauri dev
|
||||
Options
|
||||
--help, -h Displays this message
|
||||
```
|
||||
|
||||
This command will open the WebView in development mode. It makes use of the `build.devPath` property from your `src-tauri/tauri.conf.json` file.
|
||||
@@ -129,23 +83,13 @@ If you're not using `build.beforeDevCommand`, make sure your `build.devPath` is
|
||||
<Command name="build" />
|
||||
|
||||
```
|
||||
Tauri build.
|
||||
|
||||
USAGE:
|
||||
cargo tauri build [FLAGS] [OPTIONS]
|
||||
|
||||
FLAGS:
|
||||
-d, --debug Builds with the debug flag
|
||||
-h, --help Print help information
|
||||
-v, --verbose Enables verbose logging
|
||||
-V, --version Print version information
|
||||
|
||||
OPTIONS:
|
||||
-b, --bundle <bundle>... list of bundles to package
|
||||
-c, --config <config> config JSON to merge with tauri.conf.json
|
||||
-f, --features <features>... list of cargo features to activate
|
||||
-r, --runner <runner> binary to use to build the application
|
||||
-t, --target <target>... target triple to build against
|
||||
Description
|
||||
Tauri build.
|
||||
Usage
|
||||
$ tauri build
|
||||
Options
|
||||
--help, -h Displays this message
|
||||
--debug, -d Build a tauri app with debugging
|
||||
```
|
||||
|
||||
This command will bundle your application, either in production mode or debug mode if you used the `--debug` flag. It makes use of the `build.distDir` property from your `src-tauri/tauri.conf.json` file.
|
||||
@@ -189,3 +133,4 @@ This command will show the current version of Tauri.
|
||||
## CLI usage
|
||||
|
||||
See more about the usage through this [complete guide](/docs/usage/development/integration).
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
|
||||
The target directory <em>must</em> contain an index.html file.
|
||||
</div>`},
|
||||
{property: "devPath", type: "string", description: `Can be a path to a folder (either absolute or relative to tauri.conf.json) or a URL (like a live reload server).`},
|
||||
{property: "beforeDevCommand", optional: true, type: "string", description: `A command to run before starting Tauri in dev mode. The PLATFORM, ARCH, FAMILY and PLATFORM_TYPE environment variables are set if you perform conditional compilation.`},
|
||||
{property: "beforeBuildCommand", optional: true, type: "string", description: `A command to run before starting Tauri's build pipeline. The PLATFORM, ARCH, FAMILY and PLATFORM_TYPE environment variables are set if you perform conditional compilation.`},
|
||||
{property: "beforeDevCommand", optional: true, type: "string", description: `A command to run before starting Tauri in dev mode.`},
|
||||
{property: "beforeBuildCommand", optional: true, type: "string", description: `A command to run before starting Tauri in build mode.`},
|
||||
{property: "withGlobalTauri", optional: true, type: "boolean", description: "Enables the API injection to the window.__TAURI__ object. Useful if you're using Vanilla JS instead of importing the API using Rollup or Webpack. Reduces the command security since any external code can access it, so be careful with XSS attacks."}
|
||||
]}/>
|
||||
|
||||
@@ -45,8 +45,8 @@ In addition to the JSON defined on the `tauri.conf.json` file, Tauri reads a pla
|
||||
## `package`
|
||||
|
||||
<Properties anchorRoot="package" rows={[
|
||||
{ property: "productName", optional: true, type: "string", description: `Application name. Defaults to the package name specified in Cargo.toml. The binary name is converted to snake-case on Linux.` },
|
||||
{ property: "version", optional: true, type: "string", description: `Application version. Defaults to the version specified in Cargo.toml.` }
|
||||
{ property: "productName", optional: true, type: "string", description: `Application name. The binary name is converted to snake-case on Linux.` },
|
||||
{ property: "version", optional: true, type: "string", description: `Application version.` }
|
||||
]}/>
|
||||
|
||||
## `tauri`
|
||||
|
||||
@@ -37,7 +37,7 @@ $ sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \
|
||||
<TabItem value="arch">
|
||||
|
||||
```sh
|
||||
$ sudo pacman -Syy && sudo pacman -S --needed webkit2gtk \
|
||||
$ sudo pacman -Syy && sudo pacman -S webkit2gtk \
|
||||
base-devel \
|
||||
curl \
|
||||
wget \
|
||||
|
||||
@@ -36,10 +36,11 @@ emit('click', {
|
||||
Window-specific events are exposed on the `window` module.
|
||||
|
||||
```ts
|
||||
import { appWindow, WebviewWindow } from '@tauri-apps/api/window'
|
||||
import { getCurrent, WebviewWindow } from '@tauri-apps/api/window'
|
||||
|
||||
// emit an event that are only visible to the current window
|
||||
appWindow.emit('event', { message: 'Tauri is awesome!' })
|
||||
const current = getCurrent()
|
||||
current.emit('event', { message: 'Tauri is awesome!' })
|
||||
|
||||
// create a new webview window and emit an event only to that window
|
||||
const webview = new WebviewWindow('window')
|
||||
|
||||
@@ -5,8 +5,9 @@ title: Write Tauri Plugins
|
||||
import Alert from '@theme/Alert'
|
||||
|
||||
<Alert title="Note" icon="info-alt">
|
||||
The Tauri CLI can bootstrap a Plugin project with the `$ tauri init plugin --name your-plugin-name` command.
|
||||
It setups the recommended folder structure, optionally adding a TypeScript API wrapper with the `--api` flag.
|
||||
Tauri will soon offer Plugin starter kits so the process of writing a Plugin crate will be simplified.
|
||||
|
||||
For now it's recommended to follow the [official Tauri plugins](#official-tauri-plugins).
|
||||
</Alert>
|
||||
|
||||
Plugins allow you to hook into the Tauri application lifecycle and introduce new commands.
|
||||
@@ -93,10 +94,7 @@ fn main() {
|
||||
|
||||
## Official Tauri Plugins
|
||||
|
||||
- [Stronghold](https://github.com/tauri-apps/tauri-plugin-stronghold)
|
||||
- [Authenticator](https://github.com/tauri-apps/tauri-plugin-authenticator)
|
||||
- [Logging](https://github.com/tauri-apps/tauri-plugin-log)
|
||||
- [SQL](https://github.com/tauri-apps/tauri-plugin-sql)
|
||||
- [WebSocket](https://github.com/tauri-apps/tauri-plugin-websocket)
|
||||
- [Restoring window state](https://github.com/tauri-apps/tauri-plugin-window-state)
|
||||
- [Store](https://github.com/tauri-apps/tauri-plugin-store)
|
||||
- [Stronghold (WIP)](https://github.com/tauri-apps/tauri-plugin-stronghold)
|
||||
- [Authenticator (WIP)](https://github.com/tauri-apps/tauri-plugin-authenticator)
|
||||
- [Logging (WIP)](https://github.com/tauri-apps/tauri-plugin-log)
|
||||
- [SQL (WIP)](https://github.com/tauri-apps/tauri-plugin-sql)
|
||||
|
||||
@@ -5,7 +5,7 @@ title: Icons
|
||||
import Command from '@theme/Command'
|
||||
import Alert from '@theme/Alert'
|
||||
|
||||
Tauri ships with a default iconset based on its logo. This is probably NOT what you want when you ship your application. To remedy this common situation, Tauri provides the `icon` command that will take an input file ("./app-icon.png" by default) and create all the icons needed for the various platforms:
|
||||
Tauri ships with a default iconset based on its logo. This is probably NOT what you want when you ship your application. To remedy this common situation, Tauri provides the `icon` command that will take an input file and create all the icons needed for the various platforms:
|
||||
|
||||
<Command name="icon"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user