![]() ![]() engines.vscode: This specifies the minimum version of VS Code API that the extension depends on.activationEvents and contributes: Activation Events and Contribution Points.VS Code uses the ID to uniquely identify your extension. For example, the Hello World sample has the ID vscode-samples.helloworld-sample. ![]() You can find description of all VS Code specific fields in Extension Manifest Reference. The package.json contains a mix of Node.js fields such as scripts and devDependencies and VS Code specific fields such as publisher, activationEvents and contributes. Extension ManifestĮach VS Code extension must have a package.json as its Extension Manifest. However, let's focus on package.json and extension.ts, which are essential to understanding the Hello World extension. tsconfig.json consult the TypeScript Handbook.launch.json used to configure VS Code Debugging.You can read more about the configuration files: ├── tsconfig.json // TypeScript configuration │ └── extension.ts // Extension source code ├── README.md // Readable description of your extension's functionality gitignore // Ignore build output and node_modules │ └── tasks.json // Config for build task that compiles TypeScript │ ├── launch.json // Config for launching and debugging the extension Let's take a closer look at Hello World sample's source code and see how these concepts apply to it. The Extension Capabilities Overview topic helps you find the right Contribution Point and VS Code API for your extension. Summary diagrams help you grasp key concepts quickly, and end-of-chapter questions reinforce key concepts. In general, your extension would use a combination of Contribution Points and VS Code API to extend VS Code's functionality. VS Code API: a set of JavaScript APIs that you can invoke in your extension code.Contribution Points: static declarations that you make in the package.json Extension Manifest to extend VS Code.Activation Events: events upon which your extension becomes active.Understanding these three concepts is crucial to writing extensions in VS Code: Uses the commands.registerCommand VS Code API to bind a function to the registered command ID helloworld.helloWorld. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |