有人知道为什么我的扩展名没有显示在侧边栏Visual Studio代码中吗?如果我将扩展名放在扩展名文件夹中,则该扩展名有效,但不会显示在侧边栏中。
回购:https : //github.com/peni4142/work-as-two
package.json:
{
"name": "work-as-two",
"displayName": "work-as-two",
"author": {
"name": "peni4142"
},
"description": "Opens the associated file for simultaneous work on two files.",
"version": "0.1.0",
"icon": "work-as-two.jpg",
"license": "GPL-3.0-or-later",
"keywords": [
"tdd",
"testdriven",
"web",
"html",
"css"
],
"repository": {
"url": "https://github.com/peni4142/work-as-two"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"engines": {
"vscode": "^1.41.0"
},
"categories": [
"Other"
],
"activationEvents": [
"*"
],
"main": "./dist/extension.js",
"contributes": {},
"scripts": {
"vscode:prepublish": "npm run build",
"compile": "webpack --mode development",
"watch": "webpack --mode development -w",
"pretestVscode": "npm run compile",
"test": "mocha -r ts-node/register src/**/*.test.ts -u tdd",
"testVscode": "node ./out/test/runTest.js",
"build": "webpack --mode production"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^5.2.7",
"@types/node": "^12.11.7",
"@types/vscode": "^1.41.0",
"glob": "^7.1.5",
"ts-loader": "^6.2.1",
"ts-node": "^8.6.2",
"tslint": "^5.20.0",
"typescript": "^3.6.4",
"vscode-test": "^1.2.2",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.10"
}
}
看起来VSCode不再在扩展列表中显示具有未定义发布者的扩展(这肯定在某些时候可以使用)。如果我添加"publisher": "test"
到"package.json"
它显示:
由于undefined_publisher
在Log (Extension Host)
输出通道中,我想到要尝试此操作:
[2020-02-03 20:43:03.326] [exthost] [info] ExtensionService#_doActivateExtension undefined_publisher.work-as-two {"startup":true,"extensionId":{"value":"undefined_publisher.work-as-two","_lower":"undefined_publisher.work-as-two"},"activationEvent":"*"}
请注意,将扩展名直接克隆到扩展名目录不是官方支持的工作流程,因此这种情况随时可能中断。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句