Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/next' into translation-pr-test
Browse files Browse the repository at this point in the history
  • Loading branch information
dklassic committed Aug 16, 2023
2 parents 1eb6abd + ec24736 commit 7055bee
Show file tree
Hide file tree
Showing 21 changed files with 161 additions and 146 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See https://github.com/actions/labeler

i18n:
- docs/src/content/docs/fr/**/*
14 changes: 14 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Pull Request Labeler'
on:
- pull_request_target

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
[submodule "packages/plugins-workspace"]
path = packages/plugins-workspace
url = https://github.com/tauri-apps/plugins-workspace.git
branch = v2
48 changes: 27 additions & 21 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ export default defineConfig({
link: '2/guide/core-concepts',
},
{
label: 'Plugins',
link: '2/guide/plugins',
label: 'Troubleshooting',
link: '2/guide/troubleshoot',
},
],
},
{
label: 'Guides',
label: 'Workflow',
items: [
{
label: 'Develop',
Expand All @@ -74,48 +74,54 @@ export default defineConfig({
link: '2/guide/test',
},
{
label: 'Build & Distribute',
link: '2/guide/build-distribute',
label: 'Build',
link: '2/guide/build',
},
{
label: 'Troubleshoot',
link: '2/guide/troubleshoot',
label: 'Distribute',
link: '2/guide/distribute',
},
],
},
{
label: 'Features & Recipes',
link: '2/guide/list',
},
{
label: 'References',
items: [
{
label: 'Configuration',
label: 'Tauri Configuration',
link: '2/reference/config',
},
{
label: 'Command Line Interface (CLI)',
link: '2/reference/cli',
},
{
label: 'Core JavaScript API',
link: '2/reference/core/js',
label: 'JavaScript API',
link: '2/reference/js',
},
{
label: 'Core Rust API (via Docs.rs)',
label: 'Rust API (via Docs.rs)',
// TODO: Is there a way to link this to the latest pre-released version?
link: 'https://docs.rs/tauri/~2.0.0-alpha',
},
{
label: 'Plugin References',
link: '2/reference/plugin',
},
],
},
{
label: 'Tauri v1',
link: 'https://tauri.app',
label: 'Features & Recipes',
items: [
{ label: 'All Features and Recipes', link: '2/guide/list' },
{ label: 'Authenticator', link: '#' },
{ label: 'Autostart', link: '#' },
{ label: 'Localhost', link: '#' },
{ label: 'Persisted Scope', link: '#' },
{ label: 'Positioner', link: '#' },
{ label: 'Single Instance', link: '#' },
{ label: 'SQL', link: '#' },
{ label: 'Store', link: '#' },
{ label: 'Stronghold', link: '#' },
{ label: 'Upload', link: '#' },
{ label: 'Websocket', link: '#' },
{ label: 'Window State', link: '#' },
],
},
],
locales,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@astrojs/markdown-remark": "^2.2.1",
"@astrojs/starlight": "^0.7.1",
"@astrojs/starlight": "^0.7.2",
"@types/json-schema": "^7.0.12",
"astro": "^2.10.7",
"astro-feelback": "^0.3.4",
Expand Down
9 changes: 5 additions & 4 deletions packages/js-api-generator/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ const typeDocConfigBaseOptions: Partial<TypeDocOptions | PluginOptions> = {
hideGenerator: true,
theme: 'tauri-theme',
plugin: ['typedoc-plugin-mdn-links'],
readme: 'none',
// typedoc-plugin-markdown options
// https://github.com/tgreyuk/typedoc-plugin-markdown/blob/next/packages/typedoc-plugin-markdown/docs/usage/options.md
outputFileStrategy: 'modules',
flattenOutputFiles: true,
entryFileName: '../index.md',
entryFileName: 'index.md',
// TODO: Pending https://github.com/tgreyuk/typedoc-plugin-markdown/pull/455 being released so that the patch can be removed
indexFileName: 'index.md',
// indexFileName: 'index.md',
hidePageHeader: true,
hidePageTitle: true,
hideBreadcrumbs: true,
Expand All @@ -49,7 +50,7 @@ async function generator() {
entryPoints: ['../tauri/tooling/api/src/index.ts'],
tsconfig: '../tauri/tooling/api/tsconfig.json',
gitRevision: 'dev',
baseUrl: '/2/reference/core/js/',
baseUrl: '/2/reference/js/core/',
...typeDocConfigBaseOptions,
};

Expand Down Expand Up @@ -95,7 +96,7 @@ async function generator() {
entryPoints: [`../plugins-workspace/plugins/${plugin}/guest-js/index.ts`],
tsconfig: `../plugins-workspace/plugins/${plugin}/tsconfig.json`,
gitRevision: 'v2',
baseUrl: `/2/reference/plugin/${plugin}/js`,
baseUrl: `/2/reference/js/${plugin}`,
...typeDocConfigBaseOptions,
};

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins-workspace
Submodule plugins-workspace updated 164 files
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions src/components/list/JavaScript.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
import { LinkCard, CardGrid } from '@astrojs/starlight/components';
import { type CollectionEntry, getEntry } from 'astro:content';
const base = '2/reference/js';
const entries = [
'core',
'app',
'authenticator',
'autostart',
'cli',
'clipboard-manager',
'dialog',
'fs',
'global-shortcut',
'http',
'log',
'notification',
'os',
'positioner',
'process',
'shell',
'sql',
'store',
'stronghold',
'updater',
'upload',
'websocket',
'window',
'window-state',
];
const list = (await Promise.all(
entries.flatMap((entry) => getEntry('docs', `${base}/${entry}`))
)) as CollectionEntry<'docs'>[];
---

<CardGrid>
{
list
.sort((a, b) => a.data.title.localeCompare(b.data.title))
.map((item) => (
<LinkCard
title={item.data.title}
href={`/${item.slug}`}
description={item.data.description}
/>
))
}
</CardGrid>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Building & Distribution
title: Building
---

import Stub from '@components/Stub.astro';
Expand Down
7 changes: 7 additions & 0 deletions src/content/docs/2/guide/create/existing-project.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Existing Project
---

import Stub from '@components/Stub.astro';

<Stub />
10 changes: 5 additions & 5 deletions src/content/docs/2/guide/create/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Stub from '@components/Stub.astro';

One thing that makes Tauri so flexible is it's ability to work with virtually any frontend framework. We've created the [`create-tauri-app`](https://github.com/tauri-apps/create-tauri-app) utility to help you create a new Tauri project using one of the officially maintained framework templates.

`create-tauri-app` currently includes templates for vanilla (HTML, CSS and JavaScript without a framework), [Vue.js](https://vuejs.org), [Svelte](https://svelte.dev), [React](https://reactjs.org/), [SolidJS](https://www.solidjs.com/), [Angular](https://angular.io/), [Preact](https://preactjs.com/), [Yew](https://yew.rs/), [Leptos](https://github.com/leptos-rs/leptos), and [Sycamore](https://sycamore-rs.netlify.app/). You can also find or add your own community templates and frameworks in the [Awesome Tauri repo](#).
`create-tauri-app` currently includes templates for vanilla (HTML, CSS and JavaScript without a framework), [Vue.js](https://vuejs.org), [Svelte](https://svelte.dev), [React](https://reactjs.org/), [SolidJS](https://www.solidjs.com/), [Angular](https://angular.io/), [Preact](https://preactjs.com/), [Yew](https://yew.rs/), [Leptos](https://github.com/leptos-rs/leptos), and [Sycamore](https://sycamore-rs.netlify.app/). You can also find or add your own community templates and frameworks in the [Awesome Tauri repo](https://github.com/tauri-apps/awesome-tauri).

Alternatively, you can [add Tauri to an existing project](/2/guide/create/existing-project) to quickly turn your existing codebase into a Tauri app.

Expand Down Expand Up @@ -74,7 +74,7 @@ We use [SolidJS](https://www.solidjs.com) throughout the Tauri documentation and

{/* TODO: Can CTA offer to install the deps? */}

After `create-tauri-app` has complete you can navigate into your project's folder, install dependencies, then use the [Tauri CLI](/reference/cli) to start the development server:
After `create-tauri-app` has complete you can navigate into your project's folder, install dependencies, then use the [Tauri CLI](/2/reference/cli) to start the development server:

<Tabs>
<TabItem label="npm">
Expand Down Expand Up @@ -122,9 +122,9 @@ TODO: Image of app here

<Card title="Next Steps" icon="rocket">

- [Tauri Command Line Interface (CLI) Reference](/reference/cli)
- [Learn how to build your Tauri app](/guides/build)
- [Discover plugins to extend Tauri's functionality](/plugins)
- [Tauri Command Line Interface (CLI) Reference](/2/reference/cli)
- [Learn how to build your Tauri app](/2/guide/build)
- [Discover additional features and recipes to extend Tauri](/2/guide/list)

</Card>

Expand Down
17 changes: 17 additions & 0 deletions src/content/docs/2/guide/distribute.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Distributing
---

import Stub from '@components/Stub.astro';

<Stub>

- Distribution and Code Signing for...
- Linux
- macOS
- Windows
- Android `pnpm tauri [ios|android] build`
- iOS
- Updater (link to recipe)

</Stub>
14 changes: 10 additions & 4 deletions src/content/docs/2/guide/prerequisites/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sudo zypper in -t pattern devel_basis
</TabItem>
<TabItem label="NixOS">

TODO: Need to build this out
TODO: Need to build out NixOS instructions

</TabItem>
</Tabs>
Expand All @@ -123,11 +123,11 @@ Download and install Xcode from one of the following places:
- [Mac App Store](https://apps.apple.com/gb/app/xcode/id497799835?mt=12)
- [Apple Developer website](https://developer.apple.com/xcode/resources/).

{/* TODO: Do you need to launch Xcode for everything to get set up correctly before continuing? */}
Be sure to launch Xcode after installing so that it can finish setting up.

<details>
<summary>Only developing for desktop targets?</summary>
If you're only planning to develop desktop apps and not targetting iOS then you can install Xcode Command Line Tools instead:
If you're only planning to develop desktop apps and not targeting iOS then you can install Xcode Command Line Tools instead:

```sh
xcode-select --install
Expand All @@ -141,7 +141,7 @@ Next: [Install Rust](#rust)

Tauri uses the Microsoft C++ Build Tools for development as well as Microsoft Edge WebView2. These are both required for development on Windows.

Follow the steps below to install the required dependecies.
Follow the steps below to install the required dependencies.

#### Microsoft C++ Build Tools

Expand Down Expand Up @@ -193,6 +193,8 @@ Here is the file as a plain script: [rustup.sh](https://sh.rustup.rs/)

Be sure to restart your Terminal (and in some cases your system) for the changes to take affect.

Next: [Configure for Mobile Targets](#configure-for-mobile-targets) if you'd like to build for Android and iOS. Otherwise [Create a Project](/2/guide/create/).

## Configure for Mobile Targets

If you'd like to target your app for Android or iOS then there are a few additional dependencies that you need to install:
Expand Down Expand Up @@ -283,6 +285,8 @@ rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-andro
</TabItem>
</Tabs>

Next: [Setup for iOS](#ios) or [Create a project](/2/guide/create/).

### iOS

:::caution[macOS Only]
Expand All @@ -297,6 +301,8 @@ rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim

Be sure that you've installed Xcode and not Xcode Command Line Tools in the [macOS system dependencies section](#macos).

Next: [Create a project](/2/guide/create/).

## Troubleshooting

If you run into any issues during installation be sure to check the [Troubleshooting Guide](/guides/troubleshooting) or reach out on the [Tauri Discord](https://discord.com/invite/tauri).
Expand Down
4 changes: 0 additions & 4 deletions src/content/docs/2/recipe/TEMPLATE.md

This file was deleted.

13 changes: 0 additions & 13 deletions src/content/docs/2/recipe/index.mdx

This file was deleted.

6 changes: 3 additions & 3 deletions src/content/docs/2/reference/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
core/
plugin/**/
config.md
config.md
js/*
!js/index.mdx
Loading

0 comments on commit 7055bee

Please sign in to comment.