
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
generator-code
Advanced tools
We have written a Yeoman generator to help get you started. We plan to add templates for most extension/customization types into this.
Install Yeoman and the VS Code Extension generator:
npm install -g yo generator-code
The Yeoman generator will walk you through the steps required to create your customization or extension prompting for the required information.
To launch the generator simply type:
yo code
These templates will
package.json
launch.json
for running your extension and attaching to a processUsage:
yo code [<destination>] [options]
Argument (optional):
The destination to create the extension in, absolute or relative to the current working
directory. Use '.' for the current folder.
If not provided, defaults to a folder in the current working directory with the extension
display name.
Options:
-h, --help # Print the generator's options and usage
-i, --insiders # Show the insiders options for the generator
-q, --quick # Quick mode, skip all optional prompts and use defaults
-o, --open # Open the generated extension in Visual Studio Code
-O, --openInInsiders # Open the generated extension in Visual Studio Code Insiders
-t, --extensionType # ts, js, colortheme, language, snippets, keymap...
--extensionId # Id of the extension
--extensionDescription # Description of the extension
--pkgManager # 'npm' or 'yarn'
--webpack # Bundle the extension with webpack
--gitInit # Initialize a git repo
Example usages:
yo code # Create an extension in a folder with the extension's name.
yo code . -O # Create an extension in current folder and open with code-insiders
yo code Hello -t=ts -q # Create an TypeScript extension in './Hello', skip prompts, use defaults.
yo code --insiders # Show the insiders options for the generator
If you don't want to install nodejs or any node packages, use this method to containerize the generator.
Go into your project directory
cd <project directory>
Build the docker image from the docker file
docker build -t vscode-generator-code .
Create a docker container with volumes
docker run -v $(pwd):/usr/src/app vscode-generator-code
After making necessary changes, run npm link
before running yo code
to
test the local version.
You can learn more about Yeoman generator development on its documentation website.
FAQs
Yeoman generator for Visual Studio Code extensions.
The npm package generator-code receives a total of 5,016 weekly downloads. As such, generator-code popularity was classified as popular.
We found that generator-code demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.