Skip to content

Commit

Permalink
Replaced Sass with plain CSS (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed Aug 2, 2018
1 parent 9c3a85c commit cfdcc71
Show file tree
Hide file tree
Showing 22 changed files with 234 additions and 719 deletions.
2 changes: 2 additions & 0 deletions main.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

<div id="vue-root">
<link rel="stylesheet" :href="stylesheetPath">
<link rel="stylesheet" href="./styles/app.css">

<div class="container">

<div class="user-input-container" :style="userInputContainerStyle()">
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,12 @@
"@types/jest": "^23.3.1",
"@types/mathjs": "^4.4.1",
"coveralls": "^3.0.2",
"css-loader": "^1.0.0",
"electron": "^2.0.6",
"electron-builder": "^20.26.1",
"extract-loader": "^2.0.1",
"file-loader": "^1.1.11",
"husky": "^1.0.0-rc.13",
"jest": "^23.4.2",
"mathjs": "^5.0.4",
"node-sass": "^4.9.2",
"sass-loader": "^7.1.0",
"style-loader": "^0.21.0",
"ts-jest": "^23.0.1",
"ts-loader": "^4.4.2",
"ts-node": "^7.0.0",
Expand All @@ -75,4 +70,4 @@
"fuse.js": "^3.2.1",
"vue": "^2.5.17"
}
}
}
153 changes: 0 additions & 153 deletions src/scss/_app.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/scss/atom-one-dark.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/scss/dark-mono.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/scss/dark.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/scss/light-mono.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/scss/light.scss

This file was deleted.

15 changes: 0 additions & 15 deletions src/tests/unit/builders/stylesheet-path-builder.test.ts

This file was deleted.

15 changes: 0 additions & 15 deletions src/tests/unit/injector.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Injector } from "../../ts/injector";
import { platform } from "os";
import { OperatingSystem } from "../../ts/operating-system";
import { WindowsIconSet } from "../../ts/icon-sets/windows-icon-set";
import { MacOsIconSet } from "../../ts/icon-sets/mac-os-icon-set";
import { Windows10SettingsSearchPlugin } from "../../ts/search-plugins/windows-10-settings-plugin";
Expand All @@ -11,10 +9,7 @@ import { FileExecutionCommandBuilder } from "../../ts/builders/file-execution-co
import { FileLocationExecutionCommandBuilder } from "../../ts/builders/file-location-execution-command-builder";
import { FilePathRegex } from "../../ts/file-path-regex";
import { OpenUrlWithDefaultBrowserCommandBuilder } from "../../ts/builders/open-url-with-default-browser-command-builder";
import { SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG } from "constants";
import { StylesheetPath } from "../../ts/builders/stylesheet-path-builder";
import { TrayIconPathBuilder } from "../../ts/builders/tray-icon-path-builder";
import { OperatingSystemNotSupportedError } from "../../ts/errors/operatingsystem-not-supported-error";

const win = "win32";
const mac = "darwin";
Expand Down Expand Up @@ -92,16 +87,6 @@ describe(Injector.name, () => {
});
});

describe(Injector.getStyleSheetPath.name, () => {
it("should return a stylesheet path", () => {
const actualWin = Injector.getStyleSheetPath(win);
const actualMac = Injector.getStyleSheetPath(mac);

expect(actualWin).toBe(StylesheetPath.Windows);
expect(actualMac).toBe(StylesheetPath.MacOs);
});
});

describe(Injector.getTrayIconPath.name, () => {
it("should return a tray icon path", () => {
const actualWin = Injector.getTrayIconPath(win, testFilePath);
Expand Down
4 changes: 0 additions & 4 deletions src/ts/builders/stylesheet-path-builder.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/ts/color-theme-loader.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/ts/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { FileExecutionCommandBuilder } from "./builders/file-execution-command-b
import { FileLocationExecutionCommandBuilder } from "./builders/file-location-execution-command-builder";
import { FilePathRegex } from "./file-path-regex";
import { OpenUrlWithDefaultBrowserCommandBuilder } from "./builders/open-url-with-default-browser-command-builder";
import { StylesheetPath } from "./builders/stylesheet-path-builder";
import { TrayIconPathBuilder } from "./builders/tray-icon-path-builder";
import { OperatingSystemHelpers } from "./helpers/operating-system-helpers";

Expand Down Expand Up @@ -84,11 +83,4 @@ export class Injector {
case OperatingSystem.macOS: return new MacOsSettingsPlugin();
}
}

public static getStyleSheetPath(platform: string): string {
switch (OperatingSystemHelpers.getOperatingSystemFromString(platform)) {
case OperatingSystem.Windows: return StylesheetPath.Windows;
case OperatingSystem.macOS: return StylesheetPath.MacOs;
}
}
}
6 changes: 1 addition & 5 deletions src/ts/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ import { SearchResultItemViewModel } from "./search-result-item-view-model";
import { IpcChannels } from "./ipc-channels";
import { platform } from "os";
import { ipcRenderer } from "electron";
import * as macStyles from "../scss/mac.scss";
import * as windowsStyles from "../scss/windows.scss";
import Vue from "vue";
import { ConfigFileRepository } from "./config-file-repository";
import { UeliHelpers } from "./helpers/ueli-helpers";
import { defaultConfig } from "./default-config";
import { ColorThemeLoader } from "./color-theme-loader";
import { UserInputHistoryManager } from "./user-input-history-manager";
import { Injector } from "./injector";

const colorThemeLoader = new ColorThemeLoader();
const config = new ConfigFileRepository(defaultConfig, UeliHelpers.configFilePath).getConfig();
const userInputHistoryManager = new UserInputHistoryManager();
const iconSet = Injector.getIconSet(platform());
Expand All @@ -25,7 +21,7 @@ const vue = new Vue({
commandLineOutput: [] as string[],
searchIcon: iconSet.searchIcon,
searchResults: [] as SearchResultItemViewModel[],
stylesheetPath: `./build/${config.colorTheme}.css`,
stylesheetPath: `./styles/${config.colorTheme}.css`,
userInput: "",
},
el: "#vue-root",
Expand Down
Loading

0 comments on commit cfdcc71

Please sign in to comment.