From fb5c2ee740faf5696d89e20969df5eac8cfedba7 Mon Sep 17 00:00:00 2001 From: Colin Tinney Date: Sat, 18 Apr 2026 17:37:32 -0700 Subject: [PATCH] refactor: rename data/favourites to data/faves and convert projects to TypeScript - Rename src/data/favourites/ to src/data/faves/ to match page name - Convert projects.json to projects.ts with typed Project interface - Remove lastCommitDate from projects data and ProjectCard props - Update all imports Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/ProjectCard.astro | 1 - src/data/{favourites => faves}/books.ts | 0 src/data/{favourites => faves}/movies.ts | 0 src/data/{favourites => faves}/music.ts | 0 src/data/{favourites => faves}/places.ts | 0 src/data/{favourites => faves}/tv.ts | 0 src/data/projects.json | 68 ------------------------ src/data/projects.ts | 68 ++++++++++++++++++++++++ src/pages/faves.astro | 6 +-- src/pages/projects.astro | 4 +- 10 files changed, 72 insertions(+), 75 deletions(-) rename src/data/{favourites => faves}/books.ts (100%) rename src/data/{favourites => faves}/movies.ts (100%) rename src/data/{favourites => faves}/music.ts (100%) rename src/data/{favourites => faves}/places.ts (100%) rename src/data/{favourites => faves}/tv.ts (100%) delete mode 100644 src/data/projects.json create mode 100644 src/data/projects.ts diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro index a94df51..3b94574 100644 --- a/src/components/ProjectCard.astro +++ b/src/components/ProjectCard.astro @@ -5,7 +5,6 @@ interface Props { techStack: string[]; homepageUrl: string; gitHubUrl: string; - lastCommitDate?: string; index?: number; } diff --git a/src/data/favourites/books.ts b/src/data/faves/books.ts similarity index 100% rename from src/data/favourites/books.ts rename to src/data/faves/books.ts diff --git a/src/data/favourites/movies.ts b/src/data/faves/movies.ts similarity index 100% rename from src/data/favourites/movies.ts rename to src/data/faves/movies.ts diff --git a/src/data/favourites/music.ts b/src/data/faves/music.ts similarity index 100% rename from src/data/favourites/music.ts rename to src/data/faves/music.ts diff --git a/src/data/favourites/places.ts b/src/data/faves/places.ts similarity index 100% rename from src/data/favourites/places.ts rename to src/data/faves/places.ts diff --git a/src/data/favourites/tv.ts b/src/data/faves/tv.ts similarity index 100% rename from src/data/favourites/tv.ts rename to src/data/faves/tv.ts diff --git a/src/data/projects.json b/src/data/projects.json deleted file mode 100644 index b0b4309..0000000 --- a/src/data/projects.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "projects": [ - { - "name": "tinney.dev", - "shortDescription": "Personal website.", - "techStack": ["Astro", "GitHub Pages"], - "homepageUrl": "https://tinney.dev", - "gitHubUrl": "https://github.com/cdtinney/tinney.dev", - "lastCommitDate": "2026-04-08" - }, - { - "name": "spune", - "shortDescription": "Spotify visualizer for your living room TV, inspired by Zune.", - "techStack": ["React/Redux", "Node.js", "Jest", "Heroku", "MongoDB"], - "homepageUrl": "https://spune.tinney.dev", - "gitHubUrl": "https://github.com/cdtinney/spune", - "lastCommitDate": "2021-05-15" - }, - { - "name": "react-double-marquee", - "shortDescription": "A marquee component.", - "techStack": ["React", "Rollup"], - "homepageUrl": "https://www.npmjs.com/package/react-double-marquee", - "gitHubUrl": "https://github.com/cdtinney/react-double-marquee", - "lastCommitDate": "2020-10-01" - }, - { - "name": "innerdroste", - "shortDescription": "Client-side Droste effect generator, inspired by Tame Impala.", - "techStack": ["JavaScript", "HTML Canvas"], - "homepageUrl": "https://innerdroste.tinney.dev", - "gitHubUrl": "https://github.com/cdtinney/innerdroste", - "lastCommitDate": "2020-06-20" - }, - { - "name": "fresh-tabula-js", - "shortDescription": "PDF table extraction to CSV.", - "techStack": ["JavaScript", "Rollup"], - "homepageUrl": "https://www.npmjs.com/package/fresh-tabula-js", - "gitHubUrl": "https://github.com/cdtinney/fresh-tabula-js", - "lastCommitDate": "2019-08-10" - }, - { - "name": "Aerotrike Aviation", - "shortDescription": "Small business website.", - "techStack": ["Astro", "Bootstrap"], - "homepageUrl": "https://aerotrikeaviation.com", - "gitHubUrl": "https://github.com/cdtinney/aerotrike-aviation", - "lastCommitDate": "2019-04-01" - }, - { - "name": "rock1", - "shortDescription": "Alt1 plugin for Vorago in RuneScape.", - "techStack": ["JavaScript", "GitHub Pages"], - "homepageUrl": "https://cdtinney.github.io/rock1/", - "gitHubUrl": "https://github.com/cdtinney/rock1", - "lastCommitDate": "2025-02-25" - }, - { - "name": "ahk_rs3", - "shortDescription": "Personal AutoHotkey 2 framework for RuneScape 3.", - "techStack": ["AutoHotkey 2"], - "homepageUrl": "https://github.com/cdtinney/ahk_rs3", - "gitHubUrl": "https://github.com/cdtinney/ahk_rs3", - "lastCommitDate": "2025-02-11" - } - ] -} diff --git a/src/data/projects.ts b/src/data/projects.ts new file mode 100644 index 0000000..2b6a22b --- /dev/null +++ b/src/data/projects.ts @@ -0,0 +1,68 @@ +export interface Project { + name: string; + shortDescription: string; + techStack: string[]; + homepageUrl: string; + gitHubUrl: string; +} + +const projects: Project[] = [ + { + name: 'tinney.dev', + shortDescription: 'Personal website.', + techStack: ['Astro', 'GitHub Pages'], + homepageUrl: 'https://tinney.dev', + gitHubUrl: 'https://github.com/cdtinney/tinney.dev', + }, + { + name: 'spune', + shortDescription: 'Spotify visualizer for your living room TV, inspired by Zune.', + techStack: ['React/Redux', 'Node.js', 'Jest', 'Heroku', 'MongoDB'], + homepageUrl: 'https://spune.tinney.dev', + gitHubUrl: 'https://github.com/cdtinney/spune', + }, + { + name: 'react-double-marquee', + shortDescription: 'A marquee component.', + techStack: ['React', 'Rollup'], + homepageUrl: 'https://www.npmjs.com/package/react-double-marquee', + gitHubUrl: 'https://github.com/cdtinney/react-double-marquee', + }, + { + name: 'innerdroste', + shortDescription: 'Client-side Droste effect generator, inspired by Tame Impala.', + techStack: ['JavaScript', 'HTML Canvas'], + homepageUrl: 'https://innerdroste.tinney.dev', + gitHubUrl: 'https://github.com/cdtinney/innerdroste', + }, + { + name: 'fresh-tabula-js', + shortDescription: 'PDF table extraction to CSV.', + techStack: ['JavaScript', 'Rollup'], + homepageUrl: 'https://www.npmjs.com/package/fresh-tabula-js', + gitHubUrl: 'https://github.com/cdtinney/fresh-tabula-js', + }, + { + name: 'Aerotrike Aviation', + shortDescription: 'Small business website.', + techStack: ['Astro', 'Bootstrap'], + homepageUrl: 'https://aerotrikeaviation.com', + gitHubUrl: 'https://github.com/cdtinney/aerotrike-aviation', + }, + { + name: 'rock1', + shortDescription: 'Alt1 plugin for Vorago in RuneScape.', + techStack: ['JavaScript', 'GitHub Pages'], + homepageUrl: 'https://cdtinney.github.io/rock1/', + gitHubUrl: 'https://github.com/cdtinney/rock1', + }, + { + name: 'ahk_rs3', + shortDescription: 'Personal AutoHotkey 2 framework for RuneScape 3.', + techStack: ['AutoHotkey 2'], + homepageUrl: 'https://github.com/cdtinney/ahk_rs3', + gitHubUrl: 'https://github.com/cdtinney/ahk_rs3', + }, +]; + +export default projects; diff --git a/src/pages/faves.astro b/src/pages/faves.astro index 2f26303..4aaeb14 100644 --- a/src/pages/faves.astro +++ b/src/pages/faves.astro @@ -2,9 +2,9 @@ import DefaultLayout from '../layouts/DefaultLayout.astro'; import MediaCard from '../components/faves/MediaCard.astro'; import { site } from '../data/site'; -import { moviesByGenre, featuredLists } from '../data/favourites/movies'; -import { miniSeries, fullSeries } from '../data/favourites/tv'; -import music from '../data/favourites/music'; +import { moviesByGenre, featuredLists } from '../data/faves/movies'; +import { miniSeries, fullSeries } from '../data/faves/tv'; +import music from '../data/faves/music'; const byYearDesc = (items: T[]) => items.toSorted((a, b) => b.year - a.year); diff --git a/src/pages/projects.astro b/src/pages/projects.astro index d5661c8..57eebfc 100644 --- a/src/pages/projects.astro +++ b/src/pages/projects.astro @@ -1,10 +1,8 @@ --- import PageLayout from '../layouts/PageLayout.astro'; import ProjectCard from '../components/ProjectCard.astro'; -import projectsData from '../data/projects.json'; +import projects from '../data/projects'; import { site } from '../data/site'; - -const projects = projectsData.projects; ---