You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -558,9 +558,18 @@ workspace:
558
558
> [!IMPORTANT]\
559
559
> You still need to `spago install my-new-package` after adding it to the package set, or Spago will not know that you want to use it as a dependency!
560
560
561
-
If a package is not in the upstream package set, you can add it exactly in the same way, by adding it to `extraPackages`.
561
+
If a package is not in the upstream package set you can make it available in your build by adding it to `extraPackages`.
562
562
563
-
E.g. if we want to add the `facebook` package:
563
+
There are a few possible scenarios - the most straightforward is when a package is already in the registry, then you just need to specify its version:
564
+
565
+
```
566
+
workspace:
567
+
registry: 41.2.0
568
+
extraPackages:
569
+
some-package-from-the-registry: 4.0.0
570
+
```
571
+
572
+
Another possibility is that the package is not in the registry (maybe it's your own fork?), but it's a git repo somewhere - e.g. if we'd like to add the `facebook` package:
564
573
565
574
```yaml
566
575
workspace:
@@ -575,7 +584,7 @@ workspace:
575
584
> If the upstream library that you are adding has a `spago.yaml` file, then Spago will just pick up the dependencies from there.
576
585
> If that's not the case, then you'll have the provide the dependencies yourself, adding a `dependencies` field.
577
586
578
-
As you might expect, this works also in the case of adding local packages:
587
+
The last possible case is the one picking up a local folder as a package (note: you'll need a `spago.yaml` file in there):
0 commit comments