From ddc469367a4c5d16cf67eca20ce92bb47e4ff1a9 Mon Sep 17 00:00:00 2001 From: Kotkoroid Date: Sat, 22 Feb 2025 11:30:31 +0100 Subject: [PATCH] style: fix Vite and React branding (#12768) --- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/schema.json | 2 +- crates/tauri-cli/src/dev/builtin_dev_server.rs | 2 +- crates/tauri-cli/src/migrate/migrations/v1/frontend.rs | 8 ++++---- crates/tauri-cli/tauri.config.schema.json | 2 +- .../plugin/__example-api/tauri-app/src/App.svelte | 2 +- .../plugin/__example-api/tauri-app/vite.config.js | 4 ++-- crates/tauri-schema-generator/schemas/config.schema.json | 2 +- crates/tauri-utils/src/config.rs | 2 +- examples/api/vite.config.js | 4 ++-- packages/api/src/mocks.ts | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 9a63a7678..9494bcf9f 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1700,7 +1700,7 @@ ] }, "devUrl": { - "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [vite](https://vitejs.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", + "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", "type": [ "string", "null" diff --git a/crates/tauri-cli/schema.json b/crates/tauri-cli/schema.json index 9592bc756..8a060ae56 100644 --- a/crates/tauri-cli/schema.json +++ b/crates/tauri-cli/schema.json @@ -1378,7 +1378,7 @@ ] }, "devUrl": { - "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [vite](https://vitejs.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", + "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", "type": [ "string", "null" diff --git a/crates/tauri-cli/src/dev/builtin_dev_server.rs b/crates/tauri-cli/src/dev/builtin_dev_server.rs index 7873ea2aa..6751d1fac 100644 --- a/crates/tauri-cli/src/dev/builtin_dev_server.rs +++ b/crates/tauri-cli/src/dev/builtin_dev_server.rs @@ -79,7 +79,7 @@ pub fn start>(dir: P, ip: IpAddr, port: Option) -> crate::Re } async fn handler(uri: Uri, state: State) -> impl IntoResponse { - // Frontend files should not contain query parameters. This seems to be how vite handles it. + // Frontend files should not contain query parameters. This seems to be how Vite handles it. let uri = uri.path(); let uri = if uri == "/" { diff --git a/crates/tauri-cli/src/migrate/migrations/v1/frontend.rs b/crates/tauri-cli/src/migrate/migrations/v1/frontend.rs index d51ddd656..03cdaba2f 100644 --- a/crates/tauri-cli/src/migrate/migrations/v1/frontend.rs +++ b/crates/tauri-cli/src/migrate/migrations/v1/frontend.rs @@ -535,13 +535,13 @@ function App() {

Welcome to Tauri!

- + Vite logo Tauri logo - + React logo
@@ -609,13 +609,13 @@ function App() {

Welcome to Tauri!

- + Vite logo Tauri logo - + React logo
diff --git a/crates/tauri-cli/tauri.config.schema.json b/crates/tauri-cli/tauri.config.schema.json index 9592bc756..8a060ae56 100644 --- a/crates/tauri-cli/tauri.config.schema.json +++ b/crates/tauri-cli/tauri.config.schema.json @@ -1378,7 +1378,7 @@ ] }, "devUrl": { - "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [vite](https://vitejs.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", + "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", "type": [ "string", "null" diff --git a/crates/tauri-cli/templates/plugin/__example-api/tauri-app/src/App.svelte b/crates/tauri-cli/templates/plugin/__example-api/tauri-app/src/App.svelte index df696ffbf..fc7881830 100644 --- a/crates/tauri-cli/templates/plugin/__example-api/tauri-app/src/App.svelte +++ b/crates/tauri-cli/templates/plugin/__example-api/tauri-app/src/App.svelte @@ -17,7 +17,7 @@

Welcome to Tauri!

- + diff --git a/crates/tauri-cli/templates/plugin/__example-api/tauri-app/vite.config.js b/crates/tauri-cli/templates/plugin/__example-api/tauri-app/vite.config.js index 3b85afb95..82e1f23a3 100644 --- a/crates/tauri-cli/templates/plugin/__example-api/tauri-app/vite.config.js +++ b/crates/tauri-cli/templates/plugin/__example-api/tauri-app/vite.config.js @@ -3,12 +3,12 @@ import { svelte } from "@sveltejs/vite-plugin-svelte"; const host = process.env.TAURI_DEV_HOST; -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [svelte()], // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` - // prevent vite from obscuring rust errors + // prevent Vite from obscuring rust errors clearScreen: false, // tauri expects a fixed port, fail if that port is not available server: { diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 9a63a7678..9494bcf9f 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1700,7 +1700,7 @@ ] }, "devUrl": { - "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [vite](https://vitejs.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", + "description": "The URL to load in development.\n\n This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR.\n Most modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default.\n\n If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist)\n and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience.", "type": [ "string", "null" diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 00b0c2142..c73cbdd5c 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -2628,7 +2628,7 @@ pub struct BuildConfig { /// The URL to load in development. /// /// This is usually an URL to a dev server, which serves your application assets with hot-reload and HMR. - /// Most modern JavaScript bundlers like [vite](https://vitejs.dev/guide/) provides a way to start a dev server by default. + /// Most modern JavaScript bundlers like [Vite](https://vite.dev/guide/) provides a way to start a dev server by default. /// /// If you don't have a dev server or don't want to use one, ignore this option and use [`frontendDist`](BuildConfig::frontend_dist) /// and point to a web assets directory, and Tauri CLI will run its built-in dev server and provide a simple hot-reload experience. diff --git a/examples/api/vite.config.js b/examples/api/vite.config.js index a9769e8c4..d3763b5cd 100644 --- a/examples/api/vite.config.js +++ b/examples/api/vite.config.js @@ -8,7 +8,7 @@ import { svelte } from '@sveltejs/vite-plugin-svelte' const host = process.env.TAURI_DEV_HOST -// https://vitejs.dev/config/ +// https://vite.dev/config/ export default defineConfig({ plugins: [Unocss(), svelte()], build: { @@ -23,7 +23,7 @@ export default defineConfig({ }, // Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build` - // prevent vite from obscuring rust errors + // prevent Vite from obscuring rust errors clearScreen: false, // tauri expects a fixed port, fail if that port is not available server: { diff --git a/packages/api/src/mocks.ts b/packages/api/src/mocks.ts index cc7745ec1..4cba10903 100644 --- a/packages/api/src/mocks.ts +++ b/packages/api/src/mocks.ts @@ -15,7 +15,7 @@ function mockInternals() { * * # Examples * - * Testing setup using vitest: + * Testing setup using Vitest: * ```js * import { mockIPC, clearMocks } from "@tauri-apps/api/mocks" * import { invoke } from "@tauri-apps/api/core"