Skip to content

Commit dba3a91

Browse files
fix: cleanup docs about deps and icon commands (tauri-apps#484)
* fix: cleanup docs for `deps` and `icon` commands * fix: use bash for codeblock syntax highlighting * Update docs/guides/icons.md Co-authored-by: Amr Bashir <[email protected]> * remove section about deps command Co-authored-by: Amr Bashir <[email protected]>
1 parent 2667e71 commit dba3a91

File tree

14 files changed

+109
-118
lines changed

14 files changed

+109
-118
lines changed

docs/.templates/cli.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ title: CLI
66
import Command from '@theme/Command'
77
import Alert from '@theme/Alert'
88

9-
The `cli.js` command line interface is composed in TypeScript and published as a JavaScript NPM. It offers the `deps` and the `icon` commands, and propagates other commands to `cli.rs`.
10-
119
## `info`
1210

1311
<Command name="info" />
@@ -43,12 +41,6 @@ If you have entered a command to the `build.beforeDevCommand` property, this one
4341
If you're not using `build.beforeDevCommand`, make sure your `build.devPath` is correct and, if using a development server, that it's started before using this command.
4442
</Alert>
4543

46-
## `deps`
47-
48-
<Command name="deps" />
49-
50-
{deps}
51-
5244
## `build`
5345

5446
<Command name="build" />
@@ -61,27 +53,6 @@ If you have entered a command to the `build.beforeBuildCommand` property, this o
6153

6254
<a href="/docs/api/config#build">See more about the configuration.</a>
6355

64-
## `icon`
65-
66-
<Command name="icon" />
67-
68-
```
69-
Description
70-
Create all the icons you need for your Tauri app.
71-
72-
Usage
73-
$ tauri icon /path/to/icon.png
74-
75-
Options
76-
--help, -h Displays this message
77-
--log, -l Logging [boolean]
78-
--target, -t Target folder (default: 'src-tauri/icons')
79-
--compression, -c Compression type [optipng|zopfli]
80-
--ci Runs the script in CI mode
81-
```
82-
83-
This command will generate a set of icons, based on the source icon you've entered. Note that the source icon must be 1240x1240 with transparency.
84-
8556
## `version`
8657

8758
<Command name="--version" />

docs/api/cli.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ title: CLI
66
import Command from '@theme/Command'
77
import Alert from '@theme/Alert'
88

9-
The `cli.js` command line interface is composed in TypeScript and published as a JavaScript NPM. It offers the `deps` and the `icon` commands, and propagates other commands to `cli.rs`.
10-
119
## `info`
1210

1311
<Command name="info" />
@@ -106,12 +104,6 @@ If you have entered a command to the `build.beforeDevCommand` property, this one
106104
If you're not using `build.beforeDevCommand`, make sure your `build.devPath` is correct and, if using a development server, that it's started before using this command.
107105
</Alert>
108106

109-
## `deps`
110-
111-
<Command name="deps" />
112-
113-
{deps}
114-
115107
## `build`
116108

117109
<Command name="build" />
@@ -146,27 +138,6 @@ If you have entered a command to the `build.beforeBuildCommand` property, this o
146138

147139
<a href="/docs/api/config#build">See more about the configuration.</a>
148140

149-
## `icon`
150-
151-
<Command name="icon" />
152-
153-
```
154-
Description
155-
Create all the icons you need for your Tauri app.
156-
157-
Usage
158-
$ tauri icon /path/to/icon.png
159-
160-
Options
161-
--help, -h Displays this message
162-
--log, -l Logging [boolean]
163-
--target, -t Target folder (default: 'src-tauri/icons')
164-
--compression, -c Compression type [optipng|zopfli]
165-
--ci Runs the script in CI mode
166-
```
167-
168-
This command will generate a set of icons, based on the source icon you've entered. Note that the source icon must be 1240x1240 with transparency.
169-
170141
## `version`
171142

172143
<Command name="--version" />

docs/building/app-size.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,20 +247,20 @@ The following suggestions are all unstable features and require a nightly toolch
247247

248248
The following methods involve using unstable compiler features and require the rust nightly toolchain. If you don't have the nightly toolchain + `rust-src` nightly component added, try the following:
249249

250-
```sh
250+
```bash
251251
rustup toolchain install nightly
252252
rustup component add rust-src --toolchain nightly
253253
```
254254

255255
The Rust Standard Library comes precompiled. This means rust is faster to install, but also that the compiler can't optimize the Standard Library. You can apply the optimization options for the rest of your binary + dependencies to the std with an unstable flag. This flag requires specifying your target, so know the target triple you are targeting.
256256

257-
```sh
257+
```bash
258258
cargo +nightly build --release -Z build-std --target x86_64-unknown-linux-gnu
259259
```
260260

261261
If you are using `panic = "abort"` in your release profile optimizations, you need to make sure the `panic_abort` crate is compiled with std. Additionally, an extra std feature can further reduce the binary size. The following applies both:
262262

263-
```sh
263+
```bash
264264
cargo +nightly build --release -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-linux-gnu
265265
```
266266

@@ -278,7 +278,7 @@ Your compiled app includes so-called "Debug Symbols" that include function and v
278278

279279
The easiest way is to use the famous `strip` utility to remove this debugging information.
280280

281-
```sh
281+
```bash
282282
strip target/release/my_application
283283
```
284284

@@ -304,7 +304,7 @@ You should know that this technique might flag your binary as a virus on Windows
304304

305305
#### Usage on macOS
306306

307-
```sh
307+
```bash
308308
brew install upx
309309
yarn tauri build
310310
upx --ultra-brute src-tauri/target/release/bundle/macos/app.app/Contents/macOS/app

docs/community/contributor-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ When contributing to the Rust libraries `tauri`, `tauri-api`, and `tauri-updater
3232

3333
Let's make a new example. That's a great way to learn. We assume you are on a nixy type of environment like Linux or macOS and have all of your development dependencies like rust and node already sorted out.
3434

35-
```sh
35+
```bash
3636
git clone [email protected]:tauri-apps/tauri.git
3737
cd tauri/cli/tauri.js
3838
yarn

docs/debugging/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ println!("Message from Rust: {}", msg);
1414

1515
Sometimes you may have an error in your Rust code, and the Rust compiler can give you lots of information. If, for example, `tauri dev` crashes, you can rerun it like this on Linux and macOS:
1616

17-
```sh
17+
```bash
1818
RUST_DEBUG=1 tauri dev
1919
```
2020

2121
or like this on MS Windows:
2222

23-
```sh
23+
```bash
2424
set RUST_DEBUG=1
2525
tauri dev
2626
```

docs/development/updating-dependencies.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
Especially during the alpha and beta phases, we expect you to keep all Tauri dependencies and toolchains up to date. There is no support for any versions other than latest.
55
:::
66

7-
## Automatic updates
8-
9-
The Tauri JS CLI has a command to install and update all needed dependencies, just run `tauri deps install` or `tauri deps update`.
10-
11-
## Manual updates
12-
13-
### Update NPM Packages
7+
## Update NPM Packages
148

159
If you are using the `tauri` package:
1610

@@ -31,16 +25,32 @@ yarn upgrade vue-cli-plugin-tauri --latest
3125
npm install vue-cli-plugin-tauri@latest
3226
```
3327

34-
### Update Cargo Packages
28+
## Update Cargo Packages
29+
30+
You can check for outdated packages with [`cargo outdated`] or on the crates.io pages: [tauri] / [tauri-build].
31+
32+
Go to `src-tauri/Cargo.toml` and change `tauri` and `tauri-build` to
3533

36-
Go to `src-tauri/Cargo.toml` and change `tauri` to
37-
`tauri = { version = "%version%" }` where `%version%` is the version number shown above. (You can just use the `MAJOR.MINOR`) version, like `0.9`.
34+
```toml
35+
[build-dependencies]
36+
tauri-build = "%version%"
37+
38+
[dependencies]
39+
tauri = { version = "%version%" }
40+
```
41+
42+
where `%version%` is the corresponding version number from above. <!-- TODO: (You can just use the `MAJOR.MINOR`) version, like `0.9`. -->
3843

3944
Then do the following:
4045

4146
```bash
4247
cd src-tauri
43-
cargo update -p tauri
48+
cargo update
4449
```
4550

46-
You can also run `cargo outdated -r tauri` to get direct information about the core library's latest version.
51+
Alternatively you can run the `cargo upgrade` command provided by [cargo-edit] which does all of this automatically.
52+
53+
[`cargo outdated`]: https://github.com/kbknapp/cargo-outdated
54+
[tauri]: https://crates.io/crates/tauri/versions
55+
[tauri-build]: https://crates.io/crates/tauri-build/versions
56+
[cargo-edit]: https://github.com/killercup/cargo-edit

docs/getting-started/beginning-tutorial.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import Link from '@docusaurus/Link'
44
# Your First Tauri App
55

66
:::caution
7-
You must have completed all the steps required for setting up the development environment on your machine. Please see the [setup page for your operating system][Prerequisites] if you haven't done this yet.
7+
You must have completed all the steps required for setting up the development environment on your machine. Please see the [setup page for your operating system][prerequisites] if you haven't done this yet.
88
:::
99

1010
There are two ways to integrate with Tauri depending on your needs:
11+
1112
- [Start a new Tauri project](#1-start-a-new-tauri-project)
1213
- Or [add Tauri to existing project](#1-add-tauri-to-existing-project)
1314

@@ -83,7 +84,7 @@ npm install @tauri-apps/api
8384

8485
This command places a new folder in your current working directory, `src-tauri`.
8586

86-
```sh
87+
```bash
8788
└── src-tauri
8889
├── .gitignore
8990
├── Cargo.toml
@@ -158,13 +159,13 @@ This information can be beneficial when triaging problems.
158159
### Recipes
159160

160161
We've also defined prebuilt configurations called "Recipes". They may help you to customize Tauri to fit your needs.
161-
[See more about recipes][Recipes].
162+
[See more about recipes][recipes].
162163

163164
## Vue CLI Plugin Tauri
164165

165166
If you are using Vue CLI, it is recommended to use the official [Vue CLI plugin].
166167

167-
[Prerequisites]: ./prerequisites.md
168+
[prerequisites]: ./prerequisites.md
168169
[`cargo install`]: https://doc.rust-lang.org/cargo/commands/cargo-install.html#description
169-
[Recipes]: ../architecture/recipes/about-recipes.md
170-
[Vue CLI plugin]: https://github.com/tauri-apps/vue-cli-plugin-tauri
170+
[recipes]: ../architecture/recipes/about-recipes.md
171+
[vue cli plugin]: https://github.com/tauri-apps/vue-cli-plugin-tauri

docs/getting-started/setting-up-linux.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ values={[
2222
]}>
2323
<TabItem value="debian">
2424

25-
```sh
25+
```bash
2626
sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \
2727
build-essential \
2828
curl \
@@ -36,7 +36,7 @@ sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \
3636
</TabItem>
3737
<TabItem value="arch">
3838

39-
```sh
39+
```bash
4040
sudo pacman -Syu && sudo pacman -S --needed \
4141
webkit2gtk \
4242
base-devel \
@@ -53,7 +53,7 @@ sudo pacman -Syu && sudo pacman -S --needed \
5353
</TabItem>
5454
<TabItem value="fedora">
5555

56-
```sh
56+
```bash
5757
sudo dnf check-update && sudo dnf install webkit2gtk3-devel.x86_64 \
5858
openssl-devel \
5959
curl \
@@ -77,7 +77,7 @@ sudo dnf check-update && sudo dnf install webkit2gtk3-devel.x86_64 \
7777

7878
We recommend using nvm to manage your Node.js runtime. It allows you to switch versions and update Node.js easily.
7979

80-
```sh
80+
```bash
8181
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
8282
```
8383

@@ -87,7 +87,7 @@ We have audited this bash script, and it does what it says it is supposed to do.
8787

8888
Once nvm is installed, close and reopen your terminal, then install the latest version of Node.js and npm:
8989

90-
```sh
90+
```bash
9191
nvm install node --latest-npm
9292
nvm use node
9393
```
@@ -115,7 +115,7 @@ We have audited this bash script, and it does what it says it is supposed to do.
115115

116116
To make sure that Rust has been installed successfully, run the following command:
117117

118-
```sh
118+
```bash
119119
rustc --version
120120

121121
latest update on 2019-12-19, rust version 1.40.0

docs/getting-started/setting-up-macos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Icon from '@theme/Icon'
1313

1414
Make sure you have `xcode` installed.
1515

16-
```sh
16+
```bash
1717
xcode-select --install
1818
```
1919

@@ -23,7 +23,7 @@ xcode-select --install
2323

2424
We recommend using nvm to manage your Node.js runtime. It allows you to switch versions and update Node.js easily.
2525

26-
```sh
26+
```bash
2727
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
2828
```
2929

@@ -33,7 +33,7 @@ We have audited this bash script, and it does what it says it is supposed to do.
3333

3434
Once nvm is installed, close and reopen your terminal, then install the latest version of Node.js and npm:
3535

36-
```sh
36+
```bash
3737
nvm install node --latest-npm
3838
nvm use node
3939
```
@@ -61,7 +61,7 @@ We have audited this bash script, and it does what it says it is supposed to do.
6161

6262
To make sure that Rust has been installed successfully, run the following command:
6363

64-
```sh
64+
```bash
6565
rustc --version
6666

6767
latest update on 2019-12-19, rust version 1.40.0

0 commit comments

Comments
 (0)