From 73dc0200c3a786686d4dc01024635f646cccc298 Mon Sep 17 00:00:00 2001 From: Tihomir Jovicic Date: Tue, 31 Aug 2021 09:13:11 +0200 Subject: [PATCH] Explain how to develop packages locally Signed-off-by: Tihomir Jovicic --- docs/learn/1011-package-manager.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/learn/1011-package-manager.md b/docs/learn/1011-package-manager.md index 6b32e6f2..4368e27c 100644 --- a/docs/learn/1011-package-manager.md +++ b/docs/learn/1011-package-manager.md @@ -39,7 +39,7 @@ That will create 2 directories: `.dagger` and `cue.mod` where our package will r ### Install -In our example we will use `gcpcloudrun` module from [github](https://github.com/dagger/packages/blob/main/gcpcloudrun/source.cue) +In our example we will use `gcpcloudrun` package from [github](https://github.com/dagger/packages/blob/main/gcpcloudrun/source.cue) Let's first add it to our `source.cue` file: ```cue title="./source.cue" @@ -116,3 +116,13 @@ And `cue.mod/dagger.mod.cue` should reflect the new version: ```cue title="./cue.mod/dagger.mod" github.com/dagger/packages/gcpcloudrun v0.2 ``` + +## Develop package locally + +Currently, package manager cannot add local packages so a workaround is linking the package to `cue.mod/pkg`. +Create a directory with your domain name, usually github.com/myuser, and link your package directory. + +```shell +mkdir cue.mod/pkg/ +ln -s cue.mod/pkg// +```