mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
Add documentation to nu_deps (#369)
This commit is contained in:
parent
e6f3fe8e21
commit
ec6acdd773
1 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,9 @@
|
|||
#!/usr/env/bin nu
|
||||
# Go through Nushell dependencies in the first wave and find the right ordering
|
||||
#
|
||||
# Recommended usage is via a module which allows you to process the output
|
||||
# further.
|
||||
|
||||
# Extract target-specific dependencies from an opened Cargo.toml
|
||||
def get-target-dependencies [] {
|
||||
let target = ($in | get -i target)
|
||||
|
||||
|
@ -19,8 +23,9 @@ def get-target-dependencies [] {
|
|||
$res
|
||||
}
|
||||
|
||||
# Gather dependencies for each Nushell crate
|
||||
def nu-deps [] {
|
||||
# For each Nushell crate in the first publishing wave, open its Cargo.toml and
|
||||
# gather its dependencies.
|
||||
def find-deps [] {
|
||||
let second_wave = [ 'nu-command' ]
|
||||
let third_wave = [ 'nu-cli' ]
|
||||
|
||||
|
@ -45,8 +50,12 @@ def nu-deps [] {
|
|||
}
|
||||
}
|
||||
|
||||
# Find the right publish ordering of Nushell crates based on their dependencies
|
||||
#
|
||||
# Returns a list which you can process further, e.g.:
|
||||
# > nu_deps | str join (',' + (char nl))
|
||||
export def main [] {
|
||||
let deps = nu-deps
|
||||
let deps = find-deps
|
||||
|
||||
mut list = []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue