Skip to content

Instantly share code, notes, and snippets.

@SaraVieira
Forked from elijahmanor/README.md
Last active November 19, 2018 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaraVieira/3e8f3c54e5068437eb2a3c1c6c7e8bbc to your computer and use it in GitHub Desktop.
Save SaraVieira/3e8f3c54e5068437eb2a3c1c6c7e8bbc to your computer and use it in GitHub Desktop.
Export @code Extensions to a Markdown List

You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.

code-insiders --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'

npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043

NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.

#!/usr/bin/env node
const { exec } = require("child_process");
exec("code-insiders --list-extensions", (err, stdout) => {
if (err) { return; }
const markdown = stdout.split("\n").filter( e => e ).map(extension =>
`* [${extension}](https://marketplace.visualstudio.com/items\?itemName\=${extension})`
).join("\n");
console.log(markdown);
});
{
"name": "vscode-extension-markdown",
"version": "1.0.0",
"bin": "./index.js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment