mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Fixes https://github.com/microsoft/vscode/issues/100238 This is not well supported at the moment since we need some new APIs for working with untitled custom editors, how the current example shows how it can be implemented
68 lines
1.4 KiB
JSON
68 lines
1.4 KiB
JSON
{
|
|
"name": "cat-customs",
|
|
"displayName": "Cat Customs",
|
|
"description": "Custom Editor API Samples",
|
|
"version": "0.0.1",
|
|
"enableProposedApi": true,
|
|
"publisher": "vscode-samples",
|
|
"engines": {
|
|
"vscode": "^1.46.0"
|
|
},
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"activationEvents": [
|
|
"onCustomEditor:catCustoms.catScratch",
|
|
"onCustomEditor:catCustoms.pawDraw",
|
|
"onCommand:catCustoms.pawDraw.new"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/microsoft/vscode-extension-samples.git"
|
|
},
|
|
"main": "./out/extension.js",
|
|
"contributes": {
|
|
"customEditors": [
|
|
{
|
|
"viewType": "catCustoms.catScratch",
|
|
"displayName": "Cat Scratch",
|
|
"selector": [
|
|
{
|
|
"filenamePattern": "*.cscratch"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"viewType": "catCustoms.pawDraw",
|
|
"displayName": "Paw Draw",
|
|
"selector": [
|
|
{
|
|
"filenamePattern": "*.pawdraw"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"command": "catCustoms.pawDraw.new",
|
|
"title": "Create new Paw Draw Document",
|
|
"category": "Paw Draw"
|
|
}
|
|
]
|
|
},
|
|
"scripts": {
|
|
"vscode:prepublish": "npm run compile",
|
|
"compile": "tsc -p ./",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"watch": "tsc -w -p ./"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^12.12.0",
|
|
"@types/vscode": "^1.46.0",
|
|
"@typescript-eslint/eslint-plugin": "^3.0.2",
|
|
"@typescript-eslint/parser": "^3.0.2",
|
|
"eslint": "^7.1.0",
|
|
"typescript": "^3.9.4"
|
|
}
|
|
}
|