Skip to content

Commit

Permalink
data(raw) Use relative import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Aug 25, 2024
1 parent 63a65d2 commit a8e6577
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions packages/data/raw.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import invert from "invert-color";

import ghColorsJson from "@tony/cv-data/gh_colors.json";
import handPickedActivitiesJson from "@tony/cv-data/my_activities.json";
import handPickedOrgsJson from "@tony/cv-data/my_orgs.json";
import ghActivitiesJson from "@tony/cv-data/scraped/gh_activities.json";
import ghOrgsJson from "@tony/cv-data/scraped/gh_orgs.json";
import ghColorsJson from "./gh_colors.json";
import handPickedActivitiesJson from "./my_activities.json";
import handPickedOrgsJson from "./my_orgs.json";
import ghActivitiesJson from "./scraped/gh_activities.json";
import ghOrgsJson from "./scraped/gh_orgs.json";

import {
CategoryColors,
Expand All @@ -26,10 +26,10 @@ import type {
export const orgs: Org[] = [
// Make Object Key the ID
...Object.entries(handPickedOrgsJson).map(
([key, org]) => ({ ...org, id: key as unknown }) as Org,
([key, org]) => ({...org, id: key as unknown}) as Org,
),
...Object.entries(ghOrgsJson).map(
([key, org]) => ({ ...org, id: key as unknown }) as Org,
([key, org]) => ({...org, id: key as unknown}) as Org,
),
].map((org) => {
if (!org.languages.length) {
Expand All @@ -44,7 +44,7 @@ export const activities: Activity[] = [
];

const ghColorsJsonMissing: {
[key: string]: { color: string };
[key: string]: {color: string};
} = {
Sass: {
color: "#a53b70",
Expand Down Expand Up @@ -87,7 +87,7 @@ export const languages: Language[] = Array.from(
languageName in ghColorsJsonMissing
? ghColorsJsonMissing[languageName]
: // @ts-ignore
ghColorsJson[languageName];
ghColorsJson[languageName];

if (!ghColor) {
if (!(languageName in ghColorsJson)) {
Expand All @@ -102,25 +102,25 @@ export const languages: Language[] = Array.from(
id: languageName, // identify under original name
...(ghColor?.color
? {
ui: {
backgroundColor: ghColor.color,
color: invert(ghColor.color, {
threshold: 0.19,
black: "#000000",
white: "#ffffff",
}),
},
}
ui: {
backgroundColor: ghColor.color,
color: invert(ghColor.color, {
threshold: 0.19,
black: "#000000",
white: "#ffffff",
}),
},
}
: {
ui: {
backgroundColor: LANGUAGE_FALLBACK_COLOR,
color: invert(LANGUAGE_FALLBACK_COLOR, {
threshold: 0.19,
black: "#000000",
white: "#ffffff",
}),
},
}),
ui: {
backgroundColor: LANGUAGE_FALLBACK_COLOR,
color: invert(LANGUAGE_FALLBACK_COLOR, {
threshold: 0.19,
black: "#000000",
white: "#ffffff",
}),
},
}),
} as Language;
});

Expand Down

0 comments on commit a8e6577

Please sign in to comment.