Skip to content

Commit b97c7b8

Browse files
AMythicDevLagojaLucilleH
authored
guides: Improve overall wording (#1726)
## Summary So I read about devbox in a reddit thread and found it interesting. So I looked into the guides and found a typo, so while fixing that I decided to go through some more of your guides and fixed the overall wording and grammer for the docs ## How was it tested? Not tested --------- Signed-off-by: John Lago <[email protected]> Co-authored-by: John Lago <[email protected]> Co-authored-by: Lucille Hua <[email protected]>
1 parent 63093e2 commit b97c7b8

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

docs/app/docs/guides/pinning_packages.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,12 @@ Found 2+ results for "nodejs":
2727
Warning: Showing top 10 results and truncated versions. Use --show-all to show all.
2828
```
2929

30-
### Adding a Specific Version to Devbox
30+
### Specifying Package Versions
31+
If you do not include a version string, Devbox will default to using the latest available version of the package in our Nixpkg index. This is the same as adding `<pkg>@<latest>` to your devbox.json.
32+
33+
For example, to use the latest version of `ripgrep,` run `devbox add ripgrep`, `devbox add ripgrep@latest`, or add `ripgrep@latest` to your devbox.json package list.
3134

32-
To add a specific version of a package with `<package_name>@<version>`. For example, to pin the `nodejs` package to version `20.1.0`, you can run `devbox add [email protected]` or add `[email protected]` to the packages list in your `devbox.json`:
35+
To add a specific version of a package, write `<package_name>@<version>`. For example, to pin the `nodejs` package to version `20.1.0`, you can run `devbox add [email protected]` or add `[email protected]` to the packages list in your `devbox.json`:
3336

3437
```json
3538
"packages": [
@@ -39,18 +42,11 @@ To add a specific version of a package with `<package_name>@<version>`. For exam
3942

4043
For packages that use semver, you can pin a range of versions for your project. For example, if you pin `nodejs@20`, it will install the latest minor and patch version of `nodejs >=20.0.0`. You can update to the newest package version that matches your criteria by running `devbox update`.
4144

42-
When you run a command that installs your packages (like `devbox shell` or `devbox install`), Devbox will generate a `devbox.lock` file that contains the exact version and commit hash for your packages. You should check this file into source control to ensure that other developers will get the same environment.
43-
44-
### Updating your packages
45-
46-
If you want to update your packages, you can run `devbox update`. This command will update all your pinned packages to the newest compatible version in the Devbox index.
45+
Whenever you run `devbox update`, packages will be updated to their newest versions that matches your criteria. This means
46+
* Packages with the latest tag will be updated to the latest version available in our index.
47+
* Packages with a version range will be updated to the newest versions possible under that range
4748

48-
### Using the Latest Version of a Package
49-
If you do not include a version string, Devbox will default to using the latest available version of the package in our Nixpkg index. This is the same as adding `<pkg>@<latest>` to your devbox.json.
50-
51-
For example, to use the latest version of `ripgrep,` run `devbox add ripgrep`, `devbox add ripgrep@latest`, or add `ripgrep@latest` to your devbox.json package list.
52-
53-
Whenever you run `devbox update`, packages with the latest tag will be updated to the latest version available in our index.
49+
When you run a command that installs your packages (like `devbox shell` or `devbox install`), Devbox will generate a `devbox.lock` file that contains the exact version and commit hash for your packages. You should check this file into source control to ensure that other developers will get the same environment.
5450

5551
## Manually Pinning a Nixpkg Commit for a Package
5652

docs/app/docs/guides/scripts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Running Scripts
33
---
44

5-
This doc describes how to configure and run scripts using `devbox run`. Scripts started with `devbox run` are launched in a interactive `devbox shell` that terminates once the script finishes, or is interrupted by CTRL-C.
5+
Scripts are shell commands that can be defined in your devbox.json file. They can be executed by using the `devbox run` command. Scripts started with `devbox run` are launched in a interactive `devbox shell` that terminates once the script finishes, or is interrupted by CTRL-C.
66

77
Scripts will run after your packages finish installing, and after your `init_hook` completes.
88

@@ -85,4 +85,4 @@ devbox run --env-file .env.devbox echo $MY_VAR
8585
2. You can use Devbox scripts to start and manage long running background processes and daemons.
8686
1. For example -- If you are working on a LAMP stack project, you can use scripts to start MySQL and Apache in separate shells and monitor their logs. Once you are done developing, you can use CTRL-C to exit the processes and shells
8787
3. If a script feels too long to put it directly in `devbox.json`, you can save it as a shell script in your project, and then invoke it in your `devbox scripts`.
88-
4. For more ideas, see the LAMP stack example in our [Devbox examples repo](https://github.com/jetpack-io/devbox/tree/main/examples/stacks/lapp-stack).
88+
4. For more ideas, see the LAMP stack example in our [Devbox examples repo](https://github.com/jetpack-io/devbox/tree/main/examples/stacks/lapp-stack).

docs/app/docs/guides/using_flakes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Devbox currently provides two ways to use Flakes to install packages in your pro
1111

1212
## What are Flakes?
1313

14-
[Flakes](https://www.jetpack.io/blog/powered-by-flakes/) are a new feature in the Nix language that lets us package software and create development shells in a declarative, fully reproducible way. You can use Nix Flakes to define packages, apps, templates, and dev environments.
14+
[Flakes](https://www.jetpack.io/blog/powered-by-flakes/) are a new feature in the Nix language that lets you package software and create development shells in a declarative, fully reproducible way. You can use Nix Flakes to define packages, apps, templates, and dev environments.
1515

1616
Flakes are defined as a directory with a `flake.nix` and a `flake.lock` file. You import flakes to your project using a flake reference, which describes where to find the Flake, and what version or revision to use
1717

@@ -45,7 +45,7 @@ github:F1bonacc1/process-compose/v0.40.2
4545

4646
You can also install a specific attribute or package from a Flake by adding a `#` and the attribute name to the end of the package string. If you don't specify an attribute, Devbox will use `default` or `defaultPackage`
4747

48-
For example, if you want to use [Fenix](https://github.com/nix-community/fenix) to install a specific version of Nix, you can use the following string in your packages list. This example will install the `stable.toolchain` packages from the `fenix` package.
48+
For example, if you want to use [Fenix](https://github.com/nix-community/fenix) to install a specific version of Rust, you can use the following string in your packages list. This example will install the `stable.toolchain` packages from the `fenix` package.
4949

5050
```nix
5151
github:nix-community/fenix#stable.toolchain

0 commit comments

Comments
 (0)