diff --git a/src/_data/musicCharts.js b/src/_data/musicCharts.js new file mode 100644 index 00000000..77cf47a1 --- /dev/null +++ b/src/_data/musicCharts.js @@ -0,0 +1,10 @@ +import { readFile } from 'fs/promises' +import { buildChart } from './helpers/music.js' + +export default async function () { + const monthChart = JSON.parse(await readFile('./src/_data/json/scrobbles-month-chart.json', 'utf8')); + console.log(buildChart(monthChart['data'], artists, albums, nowPlaying)) + return { + month: buildChart(monthChart['data'], artists, albums, nowPlaying) + } +} \ No newline at end of file