基本环境
vscode、nodejs
npm install -g yo generator-code
yo code
npm install 安装依赖项(vscode的配置文件需要在项目文件夹下的第一级,否则找不到项目,node_module 为空)
打包发布
npm install -g vsce
vsce package
vsce publish
导入module缺少d.ts
- 或者直接建一个空的d.ts文件,文件名和模块相同
- npm i dtsmake -g
dtsmake -s 模块目录路径+模块文件名 生成d.ts文件
模块
- Window
- WebviewPanel浏览器tab
- Workspace
- 新建文档
//registerCommand回调返回Uri数据,可以打开指定文件 vscode.workspace.openTextDocument().then(o=>{ vscode.window.showTextDocument(o).then(t=>{ t.edit(e=>{