This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/_data/music.js
Cory Dransfeldt 1e249af415
chore: debug
2024-04-03 20:40:31 -07:00

10 lines
No EOL
558 B
JavaScript

import { readFile } from 'fs/promises'
import { buildChart } from './helpers/music.js'
export default async function () {
const window = JSON.parse(await readFile('./src/_data/json/scrobbles-window.json', 'utf8'));
const artists = JSON.parse(await readFile('./src/_data/json/artists-map.json', 'utf8'));
const albums = JSON.parse(await readFile('./src/_data/json/albums-map.json', 'utf8'));
const nowPlaying = JSON.parse(await readFile('./src/_data/json/now-playing.json', 'utf8'));
return buildChart(window['data'], artists, albums, nowPlaying)
}