-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode开发 #46
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
安装code命令
打开VSC快捷键
⇧⌘P
打开命令行找到shell command
选择Shell Command: Install 'code' command in PATH command
安装安装脚手架
执行完以下命令后,在VSC按
F5
,此时成功的话会打开一个新的调试窗口(扩展开发主机)Hello World
快捷键
⇧⌘P
打开命令行,执行Hello World
添加右键菜单和快捷键
打开
package.json
,按照下述方式添加:extension.sayHello
对应的是extension.js
里面的方法setting.json
Code
->首选项设置
->设置
->文本编辑器
->文件
->Associations
打包 发布
无论是本地打包还是发布到应用市场都需要借助
vsce
这个工具打包成
vsix
文件登录marketplacejian上传
监听命令
Webview
读取html需要
vscode-resource
配合配置参数
package.json
配置文件如下:在代码中获取默认的配置参数
FileSystemWatcher
用于监听文件是否发生了变化,可以监听到新建、更新、删除这 3 种事件,也可以选择忽略其中某个类型事件。创建
watcher
是利用vscode.workspace.createFileSystemWatcher: function createFileSystemWatcher(globPattern: GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher;
例如监听所有js文件的变动:
设置并持久保存token
https://gitee.com/g8up/vscode-gitee/blob/dev/src/tokens.ts
The text was updated successfully, but these errors were encountered: