Skip to content

Commit 45789df

Browse files
committed
Update package.path snippet to be more versatile
1 parent df23118 commit 45789df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Packages.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ So, if you want to `require` a file in the same working directory, e.g. `mylib`,
1616

1717
Notably, there is no standardized `lib` or `modules` folder. However, you can update `package.path` to check such folders as well:
1818
```pluto norun
19-
package.path ..= package.config[3].."lib"..package.config[1].."?.pluto"
19+
package.path ..= package.config[3].."lib/?.pluto":split("/", package.config[1])
2020
```
2121
With this, we could for example have `mylib` located at `./lib/mylib.pluto`.
2222

0 commit comments

Comments
 (0)