Skip to content

Commit ba2c385

Browse files
committed
Remove monorepo term, call the doc "Pinned Dependencies" instead
1 parent b937583 commit ba2c385

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

data/sidebar_manual_latest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"build-configuration",
5555
"build-configuration-schema",
5656
"build-external-stdlib",
57-
"build-monorepos",
57+
"build-pinned-dependencies",
5858
"interop-with-js-build-systems",
5959
"build-performance"
6060
],

pages/docs/manual/latest/build-configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Note that only sources marked with `"type":"dev"` will be able to resolve module
8484

8585
**Since 8.4**: List of pinned dependencies. A pinned dependency will always be rebuilt whenever you build a toplevel package (e.g. your main app) with `bsb -make-world`.
8686

87-
This is useful for working on multiple independent ReScript packages simultaneously. More usage details can be found in our [monorepo setup](./build-monorepos) page.
87+
This is useful for working on multiple independent ReScript packages simultaneously. More usage details can be found in our dedicated [pinned dependencies](./build-pinned-dependencies) page.
8888

8989
## external-stdlib
9090

pages/docs/manual/latest/build-monorepos.mdx renamed to pages/docs/manual/latest/build-pinned-dependencies.mdx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
---
2-
title: "Monorepo Setup"
3-
metaTitle: "Monorepo Setup"
4-
description: "Configuring ReScript in a monorepo like setup"
5-
canonical: "/docs/manual/latest/build-monorepos"
2+
title: "Pinned Dependencies"
3+
metaTitle: "Pinned Dependencies"
4+
description: "Handling multiple packages within one ReScript project with pinned dependencies"
5+
canonical: "/docs/manual/latest/build-pinned-dependencies"
66
---
77

8-
# Monorepo Setup
8+
# Pinned Dependencies
99

1010
**Since 8.4**
1111

12-
We usually recommend using ReScript in a single-codebase style, where there is only one `bsconfig.json` file for the whole codebase. Many JavaScript libraries maintain multiple packages in one single codebase though, and use `yarn workspaces` to cross-link packages locally for development.
12+
Usually we'd recommend to use ReScript in a single-codebase style: One `bsconfig.json` file for the whole codebase.
1313

14-
This workflow is not straightforward for ReScript usage, so we need to explain some additional concepts to make this work. There are three different kinds of packages:
14+
There are scenarios where you still want to connect and build multiple independent ReScript packages for one main project though. This is where `pinned-dependencies` come into play.
15+
16+
17+
### Package Types
18+
19+
Before we go into detail, let's first explain all the different package types recognized by the build system:
1520

1621
- Toplevel (this is usually the final app you are building, which has dependencies to other packages)
1722
- Pinned dependencies (these are your local packages that should always rebuild when you build your toplevel, those should be listed in `bs-dependencies` and `pinned-dependencies`)
1823
- Normal dependencies (these are packages that are consumed from npm and listed via `bs-dependencies`)
1924

2025
Whenever a package is being built (`bsb -make-world`), the build system will build the toplevel package with its pinned-dependencies. So any changes made in a pinned dependency will automatically be reflected in the final app.
2126

22-
## Build System Package Rules
27+
### Build System Package Rules
2328

2429
The build system respects the following rules for each package type:
2530

@@ -44,6 +49,8 @@ The build system respects the following rules for each package type:
4449
- Ignores pinned dependencies
4550
- Ignores custom generator rules
4651

52+
So with that knowledge in mind, let's dive into some more concrete examples to see our `pinned dependencies` in action.
53+
4754
## Examples
4855

4956
### Yarn workspaces

0 commit comments

Comments
 (0)