Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
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', 'yarn' or 'pnpm'
--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 2,610 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 0 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.