Skip to content

Commit

Permalink
hpcc-systemsGH-83 Remove moment dependency
Browse files Browse the repository at this point in the history
Remove opn dependency

Fixes hpcc-systemsGH-83

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Mar 6, 2018
1 parent c08f1ce commit e0db395
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 158 deletions.
151 changes: 1 addition & 150 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "node ./node_modules/vscode/bin/test",
"lint": "node ./node_modules/tslint/bin/tslint ./src/*.ts ./src/serverAdapter/*.ts ./test/*.ts",
"changelog": "node ./node_modules/changelog/bin/changelog.js https://github.com/hpcc-systems/vscode-ecl all --markdown",
"bump-publish": "vsce publish patch"
},
"extensionDependencies": [],
Expand All @@ -37,7 +36,6 @@
"@hpcc-js/util": "0.0.67",
"console-stamp": "0.2.6",
"es6-promise": "4.2.4",
"opn": "5.2.0",
"tslib": "1.9.0",
"vscode": "1.1.10",
"vscode-debugadapter": "1.27.0",
Expand All @@ -46,7 +44,6 @@
"devDependencies": {
"@types/mocha": "^2.2.41",
"@types/node": "^7.0.18",
"changelog": "^1.4.0",
"mocha": "^3.4.2",
"tslint": "^5.5.0",
"typescript": "^2.7.2"
Expand Down Expand Up @@ -411,4 +408,4 @@
}
}
}
}
}
7 changes: 3 additions & 4 deletions src/eclCommand.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as opn from "opn";
import * as vscode from "vscode";
import { checkTextDocument, checkWorkspace } from "./eclCheck";
import { eclDiagnostic } from "./eclDiagnostic";
Expand Down Expand Up @@ -46,14 +45,14 @@ export class ECLCommands {
}

showLanguageReference() {
opn("https://hpccsystems.com/training/documentation/ecl-language-reference/html");
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse("https://hpccsystems.com/training/documentation/ecl-language-reference/html"));
}

searchTerm(editor: vscode.TextEditor) {
if (vscode.window.activeTextEditor) {
const range = vscode.window.activeTextEditor.document.getWordRangeAtPosition(editor.selection.active);
const searchTerm = editor.document.getText(range);
opn(`https://hpccsystems.com/training/documentation/ecl-language-reference/html/${searchTerm}.html`);
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(`https://hpccsystems.com/training/documentation/ecl-language-reference/html/${searchTerm}.html`));
}
}

Expand All @@ -69,7 +68,7 @@ export class ECLCommands {
openWUDetails(url: string, wuid: string) {
const eclConfig = vscode.workspace.getConfiguration("ecl");
if (eclConfig.get<boolean>("WUOpenExternal")) {
opn(url); // TODO replace with vsocde.open
vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(url));
} else {
const uri = encodeLocation(url, wuid);
return vscode.commands.executeCommand("vscode.previewHtml", uri, vscode.ViewColumn.Two, wuid).then((success) => {
Expand Down

0 comments on commit e0db395

Please sign in to comment.