You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: src/quick.ts
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@
25
25
26
26
import*asFSfrom'fs';
27
27
import*asFSExtrafrom'fs-extra';
28
+
constHexy=require('hexy');
28
29
import*asHtmlEntitiesfrom'html-entities';
29
30
import*asGlobfrom'glob';
30
31
import*asMarkedfrom'marked';
@@ -52,6 +53,7 @@ export interface ScriptModule {
52
53
53
54
54
55
let_permanentCurrentDirectory: string;
56
+
let_permanentDisableHexView: boolean;
55
57
let_permanentNoResultInfo: boolean;
56
58
let_permanentShowResultInTab: boolean;
57
59
let_state: any;
@@ -204,6 +206,7 @@ function _generateHelpHTML(): string {
204
206
markdown+="| ---- | --------- |\n";
205
207
markdown+="| `$asString(val: any): string` | Returns a value as string. |\n";
206
208
markdown+="| `$cwd(newPath?: string, permanent?: boolean = false): string` | Gets or sets the current working directory for the execution. |\n";
209
+
markdown+="| `$disableHexView(flag?: boolean, permanent?: boolean = false): boolean` | Gets or sets if 'hex view' for binary results should be disabled or not. |\n";
@@ -224,6 +227,7 @@ function _generateHelpHTML(): string {
224
227
markdown+="| `$require(id: string): any` | Loads a module from execution / extension context. |\n";
225
228
markdown+="| `$setState(newValue: any): any` | Sets the value of `$state` variable and returns the new value. |\n";
226
229
markdown+="| `$showResultInTab(flag?: boolean, permanent?: boolean = false): boolean` | Gets or sets if result should be shown in a tab window or a popup. |\n";
230
+
markdown+="| `$toHexView(val: any): string` | Converts a value, like a buffer or string, to 'hex view'. |\n";
227
231
markdown+="| `$unlink(path: string): boolean` | Removes a file or folder. |\n";
228
232
markdown+="| `$warn(msg: string): vscode.Thenable<any>` | Shows a warning popup. |\n";
229
233
markdown+="| `$writeFile(path: string, data: any): void` | Writes data to a file. |\n";
@@ -234,8 +238,10 @@ function _generateHelpHTML(): string {
234
238
markdown+="## Variables\n";
235
239
markdown+="| Name | Description |\n";
236
240
markdown+="| ---- | --------- |\n";
241
+
markdown+="| `$config: Configuration` | The current [settings](https://mkloubert.github.io/vs-script-commands/interfaces/_contracts_.configuration.html) of that extension. |\n";
237
242
markdown+="| `$extension: vscode.ExtensionContext` | Stores the [context](https://code.visualstudio.com/docs/extensionAPI/vscode-api#_a-nameextensioncontextaspan-classcodeitem-id1016extensioncontextspan) of that extension. |\n";
238
243
markdown+="| `$globals: any` | Stores the global data from the settings. |\n";
244
+
markdown+="| `$me: ScriptCommandController` | The [controller](https://mkloubert.github.io/vs-script-commands/classes/_controller_.scriptcommandcontroller.html) of that extension. |\n";
239
245
markdown+="| `$output: vscode.OutputChannel` | Stores the [output channel](https://code.visualstudio.com/docs/extensionAPI/vscode-api#OutputChannel) of that extension. |\n";
240
246
markdown+="| `$state: any` | Stores a value that should be available for next executions. |\n";
241
247
markdown+="| `$workspace: string` | Stores the path of the current workspace. |\n";
@@ -252,7 +258,9 @@ function _generateHelpHTML(): string {
0 commit comments