Skip to content

Commit

Permalink
fix: codesandbox export
Browse files Browse the repository at this point in the history
csv file is a data url, workaround with local sync parsing
  • Loading branch information
sgratzl committed Jul 22, 2022
1 parent 84017d3 commit d72d54e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,18 @@ import "./main.css";
import * as exportDump from "./data/dump.json";
import * as exportData from "./data/raw_data.txt";
${shared.dataset!.buildScript(`exportData.default`, 'document.body', `exportDump`)}`,
// decode csv data url
const csv = atob(exportData.default.slice("data:text/plain;base64,".length));
${shared.dataset!.buildScript('csv', 'document.body', `exportDump`)}`,
},
'package.json': {
content: {
name: document.title,
description: shared.dataset!.description,
dependencies: {
lineupjs: LineUpJS.version,
papaparse: '^4.6.2',
papaparse: '^5.3.2',
},
},
},
Expand Down

0 comments on commit d72d54e

Please sign in to comment.