小编Phi*_*l W的帖子

为什么当我初始化第一个 vscode 扩展时没有匹配的命令?

我在这个页面之后初始化了我的第一个 vscode 扩展。

这是我的步骤:

  1. npm install -g yo 生成器代码
  2. 哟代码

这是生成的 package.json:

{
  "name": "helloworld",
  "displayName": "helloworld",
  "description": "description helloworld",
  "version": "0.0.1",
  "engines": {
    "vscode": "^1.72.0"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [
    "onCommand:helloworld.helloWorld"
  ],
  "main": "./out/extension.js",
  "contributes": {
    "commands": [
      {
        "command": "helloworld.helloWorld",
        "title": "Hello World"
      }
    ]
  },
  "scripts": {
    "vscode:prepublish": "npm run compile",
    "compile": "tsc -p ./",
    "watch": "tsc -watch -p ./",
    "pretest": "npm run compile && npm run lint",
    "lint": "eslint src --ext ts", …
Run Code Online (Sandbox Code Playgroud)

visual-studio-code vscode-extensions

5
推荐指数
1
解决办法
694
查看次数