Skip to content

Commit

Permalink
Add web support (full - with whats new)
Browse files Browse the repository at this point in the history
  • Loading branch information
alefragnani committed Mar 26, 2022
1 parent 3a59232 commit 4bb9e61
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,11 @@
},
{
"command": "pascal.whatsNew",
"title": "Pascal: What's New",
"enablement": "!isWeb"
"title": "Pascal: What's New"
},
{
"command": "_pascal.whatsNewContextMenu",
"title": "What's New",
"enablement": "!isWeb"
"title": "What's New"
},
{
"command": "_pascal.installDelphiThemes",
Expand Down
4 changes: 3 additions & 1 deletion src/extension-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import * as vscode from 'vscode';

import { Container } from './container';
import { registerWalkthrough } from "./commands/walkthrough";
import { registerWhatsNew } from './whats-new/commands';

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
export async function activate(context: vscode.ExtensionContext) {

Container.context = context;

await registerWhatsNew();
registerWalkthrough();
}
4 changes: 2 additions & 2 deletions src/whats-new/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { Container } from "../container";
import { WhatsNewManager } from "../../vscode-whats-new/src/Manager";
import { PascalSocialMediaProvider, PascalContentProvider } from "./contentProvider";

export function registerWhatsNew() {
export async function registerWhatsNew() {
const provider = new PascalContentProvider();
const viewer = new WhatsNewManager(Container.context)
.registerContentProvider("alefragnani", "pascal", provider)
.registerSocialMediaProvider(new PascalSocialMediaProvider());
viewer.showPageInActivation();
await viewer.showPageInActivation();
Container.context.subscriptions.push(commands.registerCommand('pascal.whatsNew', () => viewer.showPage()));
Container.context.subscriptions.push(commands.registerCommand('_pascal.whatsNewContextMenu', () => viewer.showPage()));
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"target": "ES2020",
"outDir": "out",
"lib": [
"ES2020"
"ES2020", "DOM"
],
"sourceMap": true,
"rootDir": ".",
Expand Down
2 changes: 1 addition & 1 deletion vscode-whats-new

0 comments on commit 4bb9e61

Please sign in to comment.