diff --git a/src/_data/test.js b/src/_data/test.js index 1c659c2e..5551837c 100644 --- a/src/_data/test.js +++ b/src/_data/test.js @@ -1,7 +1,10 @@ import { readFile } from 'fs/promises' +import { buildChart } from './helpers/music.js' export default async function () { - let window = JSON.parse(await readFile('./src/_data/json/scrobbles-window.json', 'utf8')); - console.log(window) - return window + 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, artists, albums, nowPlaying) }