From b11f787eeae706252b40c010a47d305ea48f176f Mon Sep 17 00:00:00 2001 From: Antoine Stevan <44101798+amtoine@users.noreply.github.com> Date: Fri, 26 Jan 2024 19:15:20 +0100 Subject: [PATCH] define a Nupm workspace (#168) use a top-level `nupm.nuon` to read the list of packages instead of hardcoding it inside `toolkit.nu`. there is no support for workspaces in Nupm yet, but i prefer moving the list of packages to another file already, even if the format might likely change in the future. --- nupm.nuon | 5 +++++ toolkit.nu | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 nupm.nuon diff --git a/nupm.nuon b/nupm.nuon new file mode 100644 index 0000000..09c5653 --- /dev/null +++ b/nupm.nuon @@ -0,0 +1,5 @@ +{ + workspace: [ + "pkgs/nu-git-manager", "pkgs/nu-git-manager-sugar" + ] +} diff --git a/toolkit.nu b/toolkit.nu index 30af921..f449c9c 100644 --- a/toolkit.nu +++ b/toolkit.nu @@ -2,7 +2,10 @@ use std repeat # NOTE: this will likely get replaced by Nupm workspaces in the future def list-modules-of-workspace []: nothing -> list { - ls pkgs/**/nupm.nuon + open nupm.nuon + | get workspace + | each { path join "nupm.nuon" } + | wrap name | insert pkg {|it| open $it.name | get name } | each {|it| $it.name | path dirname | path join $it.pkg } }