gr
gr copied to clipboard
Export to `.code-workspace` for VC Code use
Here's some jq.js code that worked for me--modify for your use (until this gets implemented 😉):
$ gr export . | jq '{folders: [.repos[] | ["..", .path, .name] | join("/") | {path: .}]}'
Output:
{
"folder": [
{
"path": "../org-name/repo-name"
}
]
}
This is heavily based on how I organize my local development space:
dev/
org-name/
repo-name/
gr
has been a huge help in collecting things across that structure.
Note, the ".."
bit should be changed to match what sort of output paths you need relative to where you're storing your .code.workspace
file.