Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
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'
--bundle # 'webpack', 'esbuild'. Bundle the extension with webpack or esbuild
--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 -it -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,652 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.