mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
🐛 rename yarn
for yarn-v4
and add run
cmpl (#720)
Heya! This `yarn` file is aimed at the latest yarn v4, which has different commands than yarn classic (v1) I renamed the file to make that difference ``` custom-completions/yarn/yarn-completion.nu #to custom-completions/yarn/yarn-v4-completions.nu ``` and also added an improvement on `yarn run` which I have on `pnpm`, changing this  into this  (note that the new yarn adds the binaries in addition to the package.json scripts values)
This commit is contained in:
parent
b2fb2b441b
commit
8386cdc628
1 changed files with 9 additions and 7 deletions
|
@ -382,14 +382,16 @@ export extern "yarn remove" [
|
|||
]
|
||||
|
||||
def "nu-complete yarn run" [] {
|
||||
let userScripts = (open ./package.json
|
||||
|get scripts
|
||||
|columns)
|
||||
let userScripts = open ./package.json
|
||||
| get scripts
|
||||
| transpose
|
||||
| rename value description
|
||||
|
||||
let binaries = (yarn bin --json
|
||||
|lines
|
||||
|each { |it| $it | from json}
|
||||
|get name)
|
||||
let binaries = yarn bin --json
|
||||
| lines
|
||||
| each { |it| $it | from json }
|
||||
| select name source
|
||||
| rename value description
|
||||
|
||||
$userScripts | append $binaries
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue