其他分享
首页 > 其他分享> > AutoNumber VsCode插件开发

AutoNumber VsCode插件开发

作者:互联网

AutoNumber VsCode插件开发

::: details 目录

目录
:::

需要将autoNumber.js脚本改为插件模式,右键就将当前markdown文档格式化

Step. 2: 安装脚手架

先全局安装脚手架

npm install -g yo generator-code

Step. 3: 创建空项目

上代码

yo code
We're constantly looking for ways to make yo better! 
May we anonymously report usage statistics to improve the tool over time?
More info: https://github.com/yeoman/insight & http://yeoman.io

我们一直在寻找让你变得更好的方法!
我们是否可以匿名报告使用统计数据,以随着时间的推移改进该工具?
更多信息:https://github.com/yeoman/insight & http://yeoman.io
? What type of extension do you want to create? (Use arrow keys)
> New Extension (TypeScript)
  New Extension (JavaScript)
  New Color Theme
  New Language Support
  New Code Snippets
  New Keymap
  New Extension Pack
  New Language Pack (Localization)
  New Web Extension (TypeScript)
  New Notebook Renderer (TypeScript)
What's the name of your extension? ()
 What's the identifier of your extension? (autonumber-for-vscode) 
 你扩展的id是什么
What's the description of your extension? ()
扩展的详细信息
Enable JavaScript type checking in 'jsconfig.json'? (y/N)
在“jsconfig”中启用JavaScript类型检查。json?(是/否)
? Initialize a git repository? (Y/n)
初始化一个git仓库
? Which package manager to use? (Use arrow keys)
> npm
  yarn
  pnpm
? Do you want to open the new folder with Visual Studio Code? (Use arrow keys)
> Open with `code`
  Skip

生成项目文件

.vscode
node_modules
test
.eslintrc.json
.vscodeignore
CHANGELOG.md
extension.js
jsconfig.json
package-lock.json
package.json
README.md

Step. 4: 打包发布

全局安装 vsce

npm install -g vsce

Step. 5: 本地打包

打包插件,让修改README.md 改成了这个插件的说明文档后,就可以打包

vsce package

Step. 6: 上传vscode插件库

将自己的插件传到公网上,通过搜索AutoNumber就可以找到我的插件

Down. 7: 下载插件

点击插件 右上角... 选择 从VSIX 安装

Refer. 8: 参考资料

标签:插件,extension,VsCode,vscode,Step,AutoNumber,New
来源: https://www.cnblogs.com/pengchenggang/p/16647123.html