Created
June 15, 2018 14:24
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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