Create your own Extension Pack for Visual Studio Code
I use multiple VSCode extensions to increase my productivity daily. When we wanted to standardize development in an important project and implement a basic set of necessary extensions, we found it necessary to create an Extension Pack. This way we could better manage the list of required extensions.
What is an Extension Pack?
It's a single extension that groups other extensions together. When installing the pack, all included extensions are installed together. It's ideal for:
- Sharing your favorite tools with colleagues
- Maintaining consistent configurations across teams
- Easily updating collections
Prerequisites
Install Node.js
Install Yeoman and the VSCode generator:
npm install -g yo generator-code
Generate your Extension Pack
Run the generator:
yo code
Select "New Extension Pack"
Choose whether to include your current extensions (I selected No to customize later)
Add your extensions
Open the generated project in VSCode (
code .
)Edit
package.json
and add the extension IDs to theextensionPack
array:"extensionPack": [ "eamodio.gitlens", "aaron-bond.better-comments", "Gruntfuggly.todo-tree", "yzhang.markdown-all-in-one", "bierner.emojisense", "usernamehw.errorlens", "IBM.output-colorizer", "PKief.material-icon-themee" ]
TIP: These are the IDs
The IDs appear at the end of the URL as 'itemName=Gydunhn.vsc-essentials', the ID is: Gydunhn.vsc-essentials.
My favorite extensions:
- GitLens — Git supercharged
- Better Comments
- Todo Tree
- Markdown All in One
- :emojisense:
- Error Lens
- Output Colorizer
- Material Icon Theme
Your Pack Icon
- Note that I added the
icon
field in thepackage.json
file, with the pathimg/essentials.png
, so if you create a folder with that name, you can put an icon with that filename there. It should be 250px x 250px, so it's identifiable when installed.- Example:
- Example:
Package your extension
Make sure
publisher
is configured inpackage.json
Run:
vsce package
A
.vsix
file will be generated in your project
Note: You can publish to the VSCode Marketplace by following the official documentation.
Install your pack
Manual installation in VSCode
- Open Extensions (
Ctrl+Shift+X
) - Click on the ⋮ menu → Install from VSIX...
- Select your
.vsix
file - Restart VSCode
Now your entire team can enjoy your extensions with just one click!
Tips
- Update the
README.md
to explain the purpose of the pack - Add a License file
- Use semantic versioning when updating
- Evaluate whether it's necessary to publish in the Marketplace to share it widely or not.
Source:
Gydunhn's Blog - Crea tu propio Extension Pack para Visual Studio Code