bump vscode extension

This commit is contained in:
Steve Ruiz 2021-11-16 16:09:01 +00:00
parent b9fdb89995
commit 53d74c8fc5
4 changed files with 12 additions and 11 deletions

View file

@ -35,9 +35,9 @@
}, },
"build": { "build": {
"appId": "io.comp.tldraw-electron", "appId": "io.comp.tldraw-electron",
"productName": "TLDraw", "productName": "tldraw",
"extraMetadata": { "extraMetadata": {
"name": "TLDraw", "name": "tldraw",
"main": "main.js" "main": "main.js"
}, },
"files": [ "files": [
@ -75,4 +75,4 @@
"publish": null "publish": null
}, },
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6" "gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
} }

View file

@ -28,6 +28,7 @@
"build": "yarn build:packages && cd www && yarn build", "build": "yarn build:packages && cd www && yarn build",
"build:packages": "cd packages/tldraw && yarn build", "build:packages": "cd packages/tldraw && yarn build",
"publish:patch": "yarn test && yarn build:packages && lerna publish patch", "publish:patch": "yarn test && yarn build:packages && lerna publish patch",
"publish:vscode": "cd vscode/extension && yarn version && yarn package && vsce publish",
"docs": "lerna run docs", "docs": "lerna run docs",
"docs:watch": "lerna run docs:watch", "docs:watch": "lerna run docs:watch",
"postinstall": "husky install", "postinstall": "husky install",

View file

@ -1,7 +1,7 @@
{ {
"name": "tldraw-vscode", "name": "tldraw-vscode",
"displayName": "TLDraw", "displayName": "tldraw",
"description": "The TLDraw Extension for VS Code.", "description": "The tldraw Extension for VS Code.",
"version": "1.0.0", "version": "1.0.0",
"license": "MIT", "license": "MIT",
"publisher": "tldraw-org", "publisher": "tldraw-org",
@ -43,7 +43,7 @@
"customEditors": [ "customEditors": [
{ {
"viewType": "tldraw.tldr", "viewType": "tldraw.tldr",
"displayName": "TLDraw", "displayName": "tldraw",
"selector": [ "selector": [
{ {
"filenamePattern": "*.tldr" "filenamePattern": "*.tldr"
@ -54,8 +54,8 @@
"commands": [ "commands": [
{ {
"command": "tldraw.tldr.new", "command": "tldraw.tldr.new",
"title": "New TLDraw File", "title": "New tldraw File",
"category": "TLDraw" "category": "tldraw"
} }
] ]
}, },
@ -79,4 +79,4 @@
"typescript": "^4.4.3", "typescript": "^4.4.3",
"vsce": "^2.2.0" "vsce": "^2.2.0"
} }
} }

View file

@ -12,12 +12,12 @@ export class TldrawEditorProvider implements vscode.CustomTextEditorProvider {
private static newTDFileId = 1 private static newTDFileId = 1
private static readonly viewType = 'Tldraw.tldr' private static readonly viewType = 'tldraw.tldr'
public static register = (context: vscode.ExtensionContext): vscode.Disposable => { public static register = (context: vscode.ExtensionContext): vscode.Disposable => {
// Register the 'Create new Tldraw file' command, which creates // Register the 'Create new Tldraw file' command, which creates
// a temporary .tldr file and opens it in the editor. // a temporary .tldr file and opens it in the editor.
vscode.commands.registerCommand('Tldraw.tldr.new', () => { vscode.commands.registerCommand('tldraw.tldr.new', () => {
const id = TldrawEditorProvider.newTDFileId++ const id = TldrawEditorProvider.newTDFileId++
const name = id > 1 ? `New Document ${id}.tldr` : `New Document.tldr` const name = id > 1 ? `New Document ${id}.tldr` : `New Document.tldr`