美文网首页
vscode插件开发指南(1)

vscode插件开发指南(1)

作者: 马太啊啊 | 来源:发表于2019-04-02 15:05 被阅读0次

vscode官网插件开发文档

前言

vscode是基于ts开发的编辑器,vscode插件开发可以用js或者ts开发

安装依赖

安装YeomanVS Code Extension Generator

npm install -g yo generator-code

初始化一个vscode插件项目

yo code

? What type of extension do you want to create? New Extension (TypeScript)
? What's the name of your extension? HelloWorld
? What's the identifier of your extension? helloworld
? What's the description of your extension? HelloWorld
? Initialize a git repository? No
? Which package manager to use? npm
等待安装依赖完成
code ./helloworld

运行项目

在vscode中打开项目,按F5启动,vscode会弹出一个扩展开发机在扩展开发机里面 就拥有这个插件 ctrl + shift + p 输入helloworld运行你的插件命令,在扩展开发机会弹出一个信息hello world!插件的功能算是打通了

相关文章

网友评论

      本文标题:vscode插件开发指南(1)

      本文链接:https://www.haomeiwen.com/subject/yvlgbqtx.html