chore(cleanup): removed theme-variant

This commit is contained in:
LasaleFamine 2018-04-21 18:17:52 +02:00
parent 5d8bfa7f2f
commit 5795b30ee6

View file

@ -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))
});
});
});
}