Skip to content

Commit 499043d

Browse files
committed
Update docs and index page with new CLI syntax
1 parent 6ed2888 commit 499043d

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/content/blog/portable-dynamically-linked-packages-on-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authorUrl: https://kyle.space
88
Hey, want to see a magic trick? If you [have Brioche installed](https://brioche.dev/docs/installation/), you can run this command:
99

1010
```sh
11-
brioche build -r curl -o ./output
11+
brioche build curl -o ./output
1212
```
1313

1414
...to get a copy of curl! Like you can then run `./output/bin/curl --version` and it works!

src/content/docs/docs/contributing/packaging-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ The basic workflow to add a new package is:
1010
2. Create a new directory for the package with a `project.bri` file, e.g. `packages/my_package/project.bri`
1111
3. Write the code to build the package!
1212
4. Test it locally:
13-
- Build it: `brioche build -p packages/my_package`
14-
- Run it: `brioche run -p packages/my_package -- --help`
15-
- Run tests: `brioche build -p packages/my_package -e test`
16-
- Test that live updates work: `brioche live-update -p packages/my_package`
13+
- Build it: `brioche build ./packages/my_package`
14+
- Run it: `brioche run ./packages/my_package -- --help`
15+
- Run tests: `brioche build ./packages/my_package -e test`
16+
- Test that live updates work: `brioche live-update ./packages/my_package`
1717
5. Fork the repo and push the new package as a branch
1818
6. Open a Pull Request to add the package
1919

src/content/docs/docs/core-concepts/cache.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ By default, enabling a custom cache will act as an "overlay" on top of the defau
2020

2121
### Syncing
2222

23-
With a custom cache configured, run `brioche build -p project_path --sync` to sync recipes baked during the project build. This will build the project as normal, plus it will upload some of the baked recipes to the cache (recipes that are fast to bake will generally not be uploaded). When other machines using Brioche use the same cache, they will pull the pre-baked recipes from the cache, avoiding the need to bake the recipes themselves.
23+
With a custom cache configured, run `brioche build ./project_path --sync` to sync recipes baked during the project build. This will build the project as normal, plus it will upload some of the baked recipes to the cache (recipes that are fast to bake will generally not be uploaded). When other machines using Brioche use the same cache, they will pull the pre-baked recipes from the cache, avoiding the need to bake the recipes themselves.
2424

2525
You can also sync multiple different builds of a project to a cache. For example, you may want to sync multiple project exports from the same project to the cache, which could look like this:
2626

2727
```bash
28-
brioche build -p project_path -e frontend --sync
29-
brioche build -p project_path -e backend --sync
28+
brioche build ./project_path -e frontend --sync
29+
brioche build ./project_path -e backend --sync
3030
```
3131

3232
## Cache vs. registry

src/content/docs/docs/core-concepts/projects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const project = {
112112

113113
`.bri` files are normal TypeScript files, so `project.bri` can export values using the JavaScript `export` keyword. These exports can be used by submodules or dependent projects.
114114

115-
Exports also serve as the actual entrypoint to builds. Running `brioche build -p project_path` will call the default export from the root module (`project.bri`). This can be changed to a different export explicitly with the `-e` flag, which names a different exported function to call. Here's a minimal example:
115+
Exports also serve as the actual entrypoint to builds. Running `brioche build ./project_path` will call the default export from the root module (`project.bri`). You can also pick a different exported function to call using the `^` syntax (e.g. `brioche build ./project_path^exportName`). Here's a minimal example:
116116

117117
```ts
118118
// Project structure:
@@ -144,7 +144,7 @@ export function backend(): std.Recipe {
144144
}
145145
```
146146

147-
You can then run `brioche build -e frontend` or `brioche build -e backend` to call the frontend or backend functions, respectively (don't forget the `-o` flag if you want to put the output somewhere!)
147+
You can then run `brioche build ^frontend` or `brioche build ^backend` to call the frontend or backend functions, respectively (don't forget the `-o` flag if you want to put the output somewhere!)
148148

149149
The export used by `brioche build` should be a function that can be called with no arguments and should return the type `std.Recipe` or a compatible subtype (it's good practice to use a more specific type if possible, such as `std.Recipe<std.Directory>` if the function returns a directory recipe).
150150

src/content/docs/docs/core-concepts/registry.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ When run, the registry will allow anyone with access to pull projects, but will
1818

1919
> **Note**: To publish projects, you'll also need to configure a [custom cache](/docs/core-concepts/cache#custom-cache)
2020
21-
Run `brioche publish -p project_path` to publish a project to a self-hosted registry. This will save an [artifact](/docs/core-concepts/artifacts) to the custom cache containing all of the project's files, then it will create or update tags for the project in the self-hosted registry, associated with the artifact's hash.
21+
Run `brioche publish ./project_path` to publish a project to a self-hosted registry. This will save an [artifact](/docs/core-concepts/artifacts) to the custom cache containing all of the project's files, then it will create or update tags for the project in the self-hosted registry, associated with the artifact's hash.
2222

23-
Then, running `brioche build -r project_name` will then call the registry to determine the artifact hash associated to `project_name`, then Brioche will retrieve the project's artifact via the cache.
23+
Then, running `brioche build project_name` will then call the registry to determine the artifact hash associated to `project_name`, then Brioche will retrieve the project's artifact via the cache.

src/content/docs/docs/core-concepts/runnables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ export function container() {
111111
}
112112
```
113113

114-
In this example, you can run `brioche run` to run the project natively on your machine, or you can run `brioche build -e container -o container.tar` to build an easily-deployable container image.
114+
In this example, you can run `brioche run` to run the project natively on your machine, or you can run `brioche build ^container -o container.tar` to build an easily-deployable container image.

src/pages/index.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const installSnippet = indoc`
2929
`;
3030
3131
const helloWorldSnippet = indoc`
32-
brioche run -r hello_world
32+
brioche run hello_world
3333
`;
3434
3535
interface Announcement {

0 commit comments

Comments
 (0)