From aa43a664ee7ea602ea5bc71c6d49e9bd7201b23f Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 19 Jun 2024 17:18:03 -0700 Subject: [PATCH] Document remote justfile workaround (#2175) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f4d7363..9a4b218 100644 --- a/README.md +++ b/README.md @@ -3668,6 +3668,22 @@ ls: echo '{{absolute_path(".")}}' ``` +### Remote Justfiles + +If you wish to include a `mod` or `import` source file in many `justfiles` +without needing to duplicate it, you can use an optional `mod` or `import`, +along with a recipe to fetch the module source: + +```just +import? 'foo.just' + +fetch: + curl https://raw.githubusercontent.com/casey/just/master/justfile > foo.just +``` + +Given the above `justfile`, after running `just fetch`, the recipes in +`foo.just` will be available. + ### Alternatives and Prior Art There is no shortage of command runners! Some more or less similar alternatives