From 5795b30ee60e5331709c8b146c36e5c53468c9bc Mon Sep 17 00:00:00 2001 From: LasaleFamine Date: Sat, 21 Apr 2018 18:17:52 +0200 Subject: [PATCH] chore(cleanup): removed theme-variant --- extensions/commands/theme-variant/index.ts | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 extensions/commands/theme-variant/index.ts diff --git a/extensions/commands/theme-variant/index.ts b/extensions/commands/theme-variant/index.ts deleted file mode 100644 index b84ea32..0000000 --- a/extensions/commands/theme-variant/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -import * as fs from "fs"; -import * as vscode from 'vscode'; - -import { getAbsolutePath, getDefaultValues, getPackageJSON } from "../../helpers/fs"; -import { getCustomSettings, setCustomSettings } from "../../helpers/settings"; - -import { CHARSET } from "../../consts/files"; -import { THEME_ICONS } from "../theme-icons/index"; -import { reloadWindow } from "../../helpers/vscode"; - -export const THEME_VARIANT = () => { - let defaults = getDefaultValues(); - let options: string[] = Object.keys(defaults.themeVariants); - let packageJSON = getPackageJSON(); - - options = options.filter(i => i !== packageJSON.contributes.themes[0].path); - - vscode.window.showQuickPick(options).then((response: string) => { - if (!response) return; - - let customSettings = getCustomSettings(); - let themepath: string = defaults.themeVariants[response]; - let themeUITheme: string = defaults.themeVariantsUITheme[response]; - - // customSettings.themeColours = response; - - packageJSON.contributes.themes[0].path = themepath; - packageJSON.contributes.themes[0].uiTheme = themeUITheme; - - fs.writeFile(getAbsolutePath('./package.json'), JSON.stringify(packageJSON, null, 2), { encoding: CHARSET }, (error) => { - if (error) { - console.trace(error); - return; - } - - setCustomSettings(customSettings).then(() => { - THEME_ICONS().then(() => reloadWindow()).catch(error => console.trace(error)) - }); - }); - }); -} \ No newline at end of file