gr icon indicating copy to clipboard operation
gr copied to clipboard

Export to `.code-workspace` for VC Code use

Open BigBlueHat opened this issue 1 year ago • 1 comments

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.

BigBlueHat avatar Nov 02 '23 18:11 BigBlueHat

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.

BigBlueHat avatar Nov 02 '23 19:11 BigBlueHat