Skip to content

Commit

Permalink
[HtmlCoqView] Fix paths to html_views
Browse files Browse the repository at this point in the history
  • Loading branch information
artagnon committed Jan 30, 2020
1 parent 9b20bde commit 63eb4cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/src/HtmlCoqView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type ProofViewProtocol = GoalUpdate | SettingsUpdate;
const VIEW_PATH = 'html_views';

function proofViewFile(file: string = "") {
return vscode.Uri.file(extensionContext.asAbsolutePath(path.join('client', VIEW_PATH,'goals',file)));
return vscode.Uri.file(extensionContext.asAbsolutePath(path.join('out', VIEW_PATH, file)));
}

function proofViewHtmlPath() {
Expand Down Expand Up @@ -123,16 +123,16 @@ export class HtmlCoqView implements view.CoqView {
viewColumn: pane,
},
{enableScripts: true,
localResourceRoots: [vscode.Uri.file(path.join(extensionContext.extensionPath, 'client', VIEW_PATH))]
localResourceRoots: [vscode.Uri.file(path.join(extensionContext.extensionPath, 'out', VIEW_PATH))]
}
);

let doc = await vscode.workspace.openTextDocument(this.coqViewUri);

let csspath = path.join(extensionContext.extensionPath, 'client', VIEW_PATH,'goals', 'proof-view.css');
let csspath = path.join(extensionContext.extensionPath, 'out', VIEW_PATH, 'proof-view.css');
let csspasthAsVscodeResource = vscode.Uri.file(csspath).with({ scheme: 'vscode-resource' });

let jspath = path.join(extensionContext.extensionPath, 'client', VIEW_PATH, 'goals', 'goals.js');
let jspath = path.join(extensionContext.extensionPath, 'out', VIEW_PATH, 'goals.js');
let jspathAsVscodeResource = vscode.Uri.file(jspath).with({ scheme: 'vscode-resource' });

this.panel.webview.html = mustache.render(doc.getText(), {
Expand Down Expand Up @@ -181,4 +181,4 @@ export class HtmlCoqView implements view.CoqView {
await this.sendMessage(Object.assign<SettingsState,{command: 'settings-update'}>(this.currentSettings,{command: 'settings-update'}));
}

}
}

0 comments on commit 63eb4cf

Please sign in to comment.