package
Yeoman generator for Visual Studio Code extensions.
npm install generator-codeGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
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-codeThe 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.jsonlaunch.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.
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-codeAfter 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.
microsoft-oss-releases
microsoft-oss-publishing@microsoft.com
Estimated unpacked size across 61 packages.
5.1 MB+
Includes dependencies.
5 direct · 1 outdated
^7.0.0
7.0.0
^3.0.0
3.0.0
^0.1.3
0.1.3
^0.8.0
0.8.0
^8.2.2
10.3.0