Publishing Extensions

Tu primera extensión

En este tema, le enseñaremos los conceptos fundamentales para crear extensiones. Asegúrese de tener Node.js y Git instalados, luego instale Yeoman y VS Code Extension Generator con:

npm install -g yo generator-code

El generador construye un proyecto de TypeScript o JavaScript listo para el desarrollo. Ejecute el generador y complete algunos campos para un proyecto de TypeScript:

yo code

# ? What type of extension do you want to create? New Extension (TypeScript)
# ? What's the name of your extension? HelloWorld
### Press <Enter> to choose default for all options below ###

# ? What's the identifier of your extension? helloworld
# ? What's the description of your extension? LEAVE BLANK
# ? Initialize a git repository? Yes
# ? Bundle the source code with webpack? No
# ? Which package manager to use? npm

# ? Do you want to open the new folder with Visual Studio Code? Open with `code`

vsce

vsce, short for “Visual Studio Code Extensions”, is a command-line tool for packaging, publishing and managing VS Code extensions.

Installation

Make sure you have Node.js installed. Then run:

npm install -g vsce

Usage

You can use vsce to easily package and publish your extensions:

$ cd myExtension
$ vsce package
# myExtension.vsix generated
$ vsce publish
# <publisherID>.myExtension published to VS Code Marketplace

vsce can also search, retrieve metadata, and unpublish extensions. For a reference on all the available vsce commands, run vsce --help.

Next Post Previous Post
No Comment
Add Comment
comment url