Skip to content

Instantly share code, notes, and snippets.

@sagirk
Created June 15, 2018 14:24
Show Gist options
  • Save sagirk/bb230a1df715a0396bf8d13b17890ea8 to your computer and use it in GitHub Desktop.
Save sagirk/bb230a1df715a0396bf8d13b17890ea8 to your computer and use it in GitHub Desktop.
Generate a list of installed extensions in Visual Studio Code and copy it to clipboard
// Credits: Kent C. Dodds https://github.com/kentcdodds
// Ref: https://github.com/kentcdodds/ama/issues/406#issuecomment-391764106
// Tip: load up the below script in a Quokka buffer to have the list just waiting in your clipboard
const {execSync, spawn} = require('child_process')
const result = execSync('code --list-extensions')
const list = String(result)
.split('\n')
.filter(Boolean)
.map(
x => `- [${x}](https://marketplace.visualstudio.com/items?itemName=${x})`
)
.join('\n')
const proc = spawn('pbcopy')
proc.stdin.write(list)
proc.stdin.end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment