From 05d1dd6b11386002680d8d0df67e975c56517ce2 Mon Sep 17 00:00:00 2001 From: Sergey Onufrienko Date: Tue, 30 May 2023 16:53:12 +0200 Subject: [PATCH] refactor: move common to theme folder --- styles/src/colorSchemes.ts | 2 +- .../themes/{common/atelier-common.ts => atelier/common.ts} | 2 +- styles/src/themes/ayu/ayu-dark.ts | 2 +- styles/src/themes/ayu/ayu-light.ts | 2 +- styles/src/themes/ayu/ayu-mirage.ts | 2 +- styles/src/themes/{common/ayu-common.ts => ayu/common.ts} | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) rename styles/src/themes/{common/atelier-common.ts => atelier/common.ts} (96%) rename styles/src/themes/{common/ayu-common.ts => ayu/common.ts} (95%) diff --git a/styles/src/colorSchemes.ts b/styles/src/colorSchemes.ts index e8d06870440e0d2fe1f1cb528ff04ed5e79b1f5f..07eb26a591d6014ff6f73dcce73fe2ac86515e11 100644 --- a/styles/src/colorSchemes.ts +++ b/styles/src/colorSchemes.ts @@ -4,7 +4,7 @@ import { ColorScheme, Meta } from "./themes/common/colorScheme" const THEMES_DIRECTORY = path.resolve(`${__dirname}/themes`) const STAFF_DIRECTORY = path.resolve(`${__dirname}/themes/staff`) -const IGNORE_ITEMS = ["staff", "common", "template.ts"] +const IGNORE_ITEMS = ["staff", "common", "common.ts"] const ACCEPT_EXTENSION = ".ts" function getAllTsFiles(directoryPath: string) { diff --git a/styles/src/themes/common/atelier-common.ts b/styles/src/themes/atelier/common.ts similarity index 96% rename from styles/src/themes/common/atelier-common.ts rename to styles/src/themes/atelier/common.ts index 08a915d01948f300441d0904cbff2fd406e3dcba..7fb07f7a6e98beb2b9d7c53ee60f03bedcdcdc12 100644 --- a/styles/src/themes/common/atelier-common.ts +++ b/styles/src/themes/atelier/common.ts @@ -1,4 +1,4 @@ -import { License, Meta, ThemeSyntax } from "./colorScheme" +import { License, Meta, ThemeSyntax } from "../common/colorScheme" export interface Variant { meta: Meta diff --git a/styles/src/themes/ayu/ayu-dark.ts b/styles/src/themes/ayu/ayu-dark.ts index eb837231fe1b0d3818768ce0b149a512d6ea3f7d..1dc663f161b6baa862fb42cb07fc9ddbb9c5c3e0 100644 --- a/styles/src/themes/ayu/ayu-dark.ts +++ b/styles/src/themes/ayu/ayu-dark.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu/ayu-light.ts b/styles/src/themes/ayu/ayu-light.ts index 9c29449db5bd323e21aa9004a1b2ac2731c0a617..25435219447e1d7e4dd1125c59cb04cb420315eb 100644 --- a/styles/src/themes/ayu/ayu-light.ts +++ b/styles/src/themes/ayu/ayu-light.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/ayu/ayu-mirage.ts b/styles/src/themes/ayu/ayu-mirage.ts index 52bf5493922102fffd9cd8cc0eef24ba9bb2b720..2ada3678ee47a95112bcff76150b8b2f54273f40 100644 --- a/styles/src/themes/ayu/ayu-mirage.ts +++ b/styles/src/themes/ayu/ayu-mirage.ts @@ -1,5 +1,5 @@ import { createColorScheme } from "../common/ramps" -import { ayu, meta as themeMeta, buildTheme } from "../common/ayu-common" +import { ayu, meta as themeMeta, buildTheme } from "./common" export const meta = { ...themeMeta, diff --git a/styles/src/themes/common/ayu-common.ts b/styles/src/themes/ayu/common.ts similarity index 95% rename from styles/src/themes/common/ayu-common.ts rename to styles/src/themes/ayu/common.ts index f08817ef492e7c56fac0e593ffd0d74d1e4d735b..2d3687801f82300cc95af15941ec1ce72ea5e3ad 100644 --- a/styles/src/themes/common/ayu-common.ts +++ b/styles/src/themes/ayu/common.ts @@ -1,8 +1,8 @@ import { dark, light, mirage } from "ayu" -import { ThemeSyntax } from "./syntax" +import { ThemeSyntax } from "../common/syntax" import chroma from "chroma-js" -import { colorRamp } from "./ramps" -import { Meta } from "./colorScheme" +import { colorRamp } from "../common/ramps" +import { Meta } from "../common/colorScheme" export const ayu = { dark,