From 7a89aefda31261be6b9555efd8b3bab8350cd9f9 Mon Sep 17 00:00:00 2001 From: lorenzolewis Date: Thu, 21 Dec 2023 13:29:43 +0000 Subject: [PATCH] [ci] format --- packages/config-generator/build.ts | 21 ++++++++++++--------- packages/js-api-generator/build.ts | 11 +++++++---- src/content/docs/references/index.mdx | 5 +---- src/content/docs/references/v1/cli.mdx | 10 +++++----- 4 files changed, 25 insertions(+), 22 deletions(-) diff --git a/packages/config-generator/build.ts b/packages/config-generator/build.ts index 1af4d38bb0..68986ae73b 100644 --- a/packages/config-generator/build.ts +++ b/packages/config-generator/build.ts @@ -2,33 +2,36 @@ import { JSONSchema7, JSONSchema7Definition, JSONSchema7TypeName } from 'json-sc import { existsSync, writeFileSync } from 'node:fs'; import { slug } from 'github-slugger'; -buildConfig('../tauri-v1/core/tauri-config-schema/schema.json', '../../src/content/docs/references/v1/config.md') -buildConfig('../tauri-v2/core/tauri-config-schema/schema.json', '../../src/content/docs/references/v2/config.md') +buildConfig( + '../tauri-v1/core/tauri-config-schema/schema.json', + '../../src/content/docs/references/v1/config.md' +); +buildConfig( + '../tauri-v2/core/tauri-config-schema/schema.json', + '../../src/content/docs/references/v2/config.md' +); async function buildConfig(schemaFile: string, outputFile: string) { if (!existsSync(schemaFile)) { throw Error('Could not find the Tauri config schema. Is the Tauri submodule initialized?'); } - + let schema: JSONSchema7 = (await import(schemaFile)).default; - + const output = [ '---\n# NOTE: This file is auto-generated in packages/config-generator/build.ts\n# For corrections please edit https://github.com/tauri-apps/tauri/blob/dev/core/tauri-utils/src/config.rs directly\n\ntitle: Configuration\n---', ]; - + output.push( ...buildSchemaDefinition(schema, { headingLevel: 2, renderTitle: false, }) ); - + writeFileSync(outputFile, output.join('\n\n')); } - - - interface Options { headingLevel: number; renderTitle: boolean; diff --git a/packages/js-api-generator/build.ts b/packages/js-api-generator/build.ts index 06799aa956..6091e0692c 100644 --- a/packages/js-api-generator/build.ts +++ b/packages/js-api-generator/build.ts @@ -56,9 +56,11 @@ async function generator() { await generateDocs(coreJsOptions); } else { - console.log('Tauri V1 submodule is not initialized, respective API routes will not be rendered.'); + console.log( + 'Tauri V1 submodule is not initialized, respective API routes will not be rendered.' + ); } - + if (existsSync('../tauri-v2/tooling/api/node_modules')) { const coreJsOptions: Partial = { entryPoints: ['../tauri-v2/tooling/api/src/index.ts'], @@ -70,7 +72,9 @@ async function generator() { await generateDocs(coreJsOptions); } else { - console.log('Tauri V2 submodule is not initialized, respective API routes will not be rendered.'); + console.log( + 'Tauri V2 submodule is not initialized, respective API routes will not be rendered.' + ); } const plugins = [ @@ -164,7 +168,6 @@ class TauriTheme extends MarkdownTheme { } class TauriThemeRenderContext extends MarkdownThemeRenderContext { - constructor(event: PageEvent, options: Options) { super(event, options); } diff --git a/src/content/docs/references/index.mdx b/src/content/docs/references/index.mdx index c9d1fef1f1..0ac25b0e9d 100644 --- a/src/content/docs/references/index.mdx +++ b/src/content/docs/references/index.mdx @@ -22,10 +22,7 @@ import { LinkCard, CardGrid } from '@astrojs/starlight/components'; - + ## Additional References diff --git a/src/content/docs/references/v1/cli.mdx b/src/content/docs/references/v1/cli.mdx index 9a7ae8ceb3..feba7ca44d 100644 --- a/src/content/docs/references/v1/cli.mdx +++ b/src/content/docs/references/v1/cli.mdx @@ -168,9 +168,9 @@ Options: -t, --target Target triple to build against. - + It must be one of the values outputted by `$rustc --print target-list` or `universal-apple-darwin` for an universal macOS application. - + Note that compiling an universal macOS application requires both `aarch64-apple-darwin` and `x86_64-apple-darwin` targets to be installed. -f, --features [...] @@ -178,9 +178,9 @@ Options: -b, --bundles [...] Space or comma separated list of bundles to package. - + Each bundle must be one of `deb`, `appimage`, `msi`, `app` or `dmg` on MacOS and `updater` on all platforms. If `none` is specified, the bundler will be skipped. - + Note that the `updater` bundle is not automatically added so you must specify it if the updater is enabled. -c, --config @@ -399,4 +399,4 @@ This command will show the current version of Tauri. ## CLI usage -See more about the usage through this [complete guide](../guides/development/development-cycle). \ No newline at end of file +See more about the usage through this [complete guide](../guides/development/development-cycle).