Skip to content

Commit

Permalink
define a Nupm workspace (#168)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amtoine authored Jan 26, 2024
1 parent d1ecc77 commit b11f787
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions nupm.nuon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
workspace: [
"pkgs/nu-git-manager", "pkgs/nu-git-manager-sugar"
]
}
5 changes: 4 additions & 1 deletion toolkit.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
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 }
}
Expand Down

0 comments on commit b11f787

Please sign in to comment.