-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nidib/v0.1.0-beta
Releases v0.1.0-beta
- Loading branch information
Showing
9 changed files
with
71 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,22 +14,31 @@ | |
"url": "https://github.com/nidib/term-preview/issues", | ||
"email": "[email protected]" | ||
}, | ||
"version": "0.0.5-alpha", | ||
"version": "0.1.0-beta", | ||
"engines": { | ||
"vscode": "^1.63.0" | ||
}, | ||
"categories": ["Other"], | ||
"activationEvents": ["*"], | ||
"activationEvents": [ | ||
"onCommand:term-preview.loadTerms", | ||
"onStartupFinished" | ||
], | ||
"main": "./out/extension.js", | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "term-preview.loadTerms", | ||
"title": "Load terms" | ||
} | ||
], | ||
"configuration": { | ||
"title": "Term Preview", | ||
"properties": { | ||
"termPreview.enabled": { | ||
"order": 0, | ||
"type": "boolean", | ||
"markdownDescription": "Enables the term preview on hover", | ||
"default": false | ||
"markdownDescription": "Enables the extension", | ||
"default": true | ||
}, | ||
"termPreview.absolutePathToTermsRoot": { | ||
"type": "string", | ||
|
@@ -38,15 +47,15 @@ | |
}, | ||
"termPreview.file": { | ||
"type": "string", | ||
"markdownDescription": "Your file name. `{{LANGUAGE}}` is the placeholder for the language", | ||
"markdownDescription": "Your file name. `{{LANGUAGE}}` will be replaced by each of the selected languages", | ||
"default": "" | ||
}, | ||
"termPreview.languages": { | ||
"type":"array", | ||
"items": { | ||
"type": "string" | ||
}, | ||
"markdownDescription": "The languages you want your terms translated to (must match file names)", | ||
"markdownDescription": "The languages you want your terms translated to (must match file name)", | ||
"default": ["en-us"] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import * as vscode from 'vscode'; | ||
import App from './app/app'; | ||
|
||
export function activate(context: vscode.ExtensionContext) { | ||
export function activate(_context: vscode.ExtensionContext) { | ||
const app = new App(); | ||
let disposable: vscode.Disposable | undefined; | ||
let runApp = () => { | ||
try { | ||
disposable && disposable.dispose(); | ||
disposable = app.run(); | ||
} catch (err: any) { | ||
vscode.window.showErrorMessage(err.message); | ||
} | ||
}; | ||
|
||
app.run(context); | ||
runApp(); | ||
|
||
vscode.commands.registerCommand('term-preview.loadTerms', runApp); | ||
vscode.workspace.onDidChangeConfiguration(runApp); | ||
} | ||
|
||
export function deactivate() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const configDefaults = { | ||
ABS_PATH: '', | ||
ENABLED: false, | ||
ENABLED: true, | ||
FILE: '', | ||
LANGUAGES: ['en-us'] | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters