
* chore: move env into src for better build * chore: removed unused things from webviews * feat: a better "defaults" - material-theme.config.json * chore: fix paths for scripts * feat: new folder "core" with managers * chore: cleanup all useless things * chore: update messages to be messages * refactor: new setAccent command and better material.theme.config entry
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import {
|
|
commands as Commands,
|
|
ExtensionContext
|
|
} from 'vscode';
|
|
|
|
import * as ThemeCommands from './commands';
|
|
import {installationMessage} from './helpers/messages';
|
|
import {ReleaseNotesWebview} from './webviews/ReleaseNotes';
|
|
import {changelogManager} from './core/changelog-manager';
|
|
import {extensionManager} from './core/extension-manager';
|
|
|
|
export async function activate(context: ExtensionContext): Promise<void> {
|
|
const releaseNotesView = new ReleaseNotesWebview(context);
|
|
const installationType = extensionManager.getInstallationType();
|
|
|
|
// TODO: BEFORE RELEASE add new message for new install because with the refactor also updates will be considered as new install, for the first time
|
|
if (installationType.firstInstall) {
|
|
await installationMessage();
|
|
}
|
|
|
|
if ((installationType.firstInstall || installationType.update) && await changelogManager.askShowChangelog()) {
|
|
await releaseNotesView.show();
|
|
}
|
|
|
|
// Registering commands
|
|
Commands.registerCommand('materialTheme.setAccent', ThemeCommands.setAccent);
|
|
Commands.registerCommand('materialTheme.showReleaseNotes', async () => releaseNotesView.show());
|
|
}
|