VSCode Extensions Madness
The other day was looking at my vscode extensions and was thinking on how to get a list of my extensions, and when started doing my research and realized I was late to the party (everybody already doing this)
Coincidentally today Kent C Dodds in his DevTips with Kent today video, at the beginning he explained how he does it
here is the reference to the code in the video. One thing to be noted is if you try to run that code on windows will get the following error:
Quokka 'Untitled-1.js' (node: v11.6.0)
write EPIPE
at afterWriteDispatched internal/stream_base_commons.js:125
at writeGeneric internal/stream_base_commons.js:117
at Socket._writeGeneric net.js:720
at Socket._write net.js:732
at doWrite _stream_writable.js:415``
at writeOrBuffer _stream_writable.js:399
at Socket.Writable.write _stream_writable.js:299
at Object.<anonymous> quokka.js:14:0
spawn pbcopy ENOENT
at Process.ChildProcess._handle.onexit internal/child_process.js:246
at onErrorNT internal/child_process.js:421
at process.internalTickCallback internal/process/next_tick.js:72
<Buffer >
and it is because this pbcopy
parameter in the const proc = spawn('pbcopy')
line only works for MAC OS, just change it to clip
if you are in Windows and problem solved.
That generates and unordered list with the direct link of each extension, great for documentation.
But maybe you need a little bit more than just documentation, maybe something like a file with some instructions to run it in another pc or share it with some friend and there a command line script could help. Of course vscode allows extension management via UI but also have command line options to do that, and that could be handy if you want to install vscode via maybe cmd
or poweshell
, even via chocolatey
Found this script after a quick search on google and want to share it
This is a linux command, so if you are in windows you can use wsl. This was the result in my case:
Leave a comment